Hello,

Some Background:

In the computers we manage we have some that are masters and some that are slaves. The computers that are masters (~1/4 of the computeres) are running a process called ProcessA.exe. The slave computers are not running ProcessA.exe. I would like to have a smart label that groups only computers that have ProcessA.exe listed in their Running Processes.

There are some other things that differentiate our master computers from the slave computers but the most reliable indicator that a computer is a Master is whether or not ProcessA.exe is running.

In the future I would like to use all the computers in the Master Label as replication shares for all the computers in the slave label to pull from.

The Question:

Is there a way for me to create a smart label with all computers that have ProcessA.exe listed in the 'Running Processes' field in the machine's inventory?

Thanks!

jobla

0 Comments   [ + ] Show Comments

Comments

  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment

Community Chosen Answer

3

It should be possible. Whenever I've ran queries against processes they tend to go extremely slow, or even lock up the Kbox. I would assume the same would be true in a smart label. Maybe that's why they don't make it available? Either way create a dummy label. Go into the label details and edit the SQL query. This should work for you.

select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,

UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS

from ORG1.MACHINE

LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID

LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1

where ((  (1  in (select 1 from ORG1.PROCESS, ORG1.MACHINE_PROCESS_JT

where MACHINE.ID = MACHINE_PROCESS_JT.MACHINE_ID and MACHINE_PROCESS_JT.PROCESS_ID = PROCESS.ID

and PROCESS.NAME like 'PROCESSA.EXE%')) ))
Answered 09/19/2012 by: dugullett
Red Belt

  • Hmm, before I try the SQL query on our machines would you say that the risk is pretty high? If I can avoid freezing up our KBox that would probably be a good thing. We have ~450 computers in our inventory each running 30-40 processes.
  • I have over 23,000 machines which is probably part of the reason. It eventually came back. I was just not able to get to the web interface for a few minutes. 450 machines shouldn't be too bad.
  • I tried this and it works great...so how would I determine if a process isn't running using similar setup as above? What would be the SQL?
    • I haven't tested, but you should be able to change the last line to read something like this below.
      and PROCESS.NAME not like 'PROCESSA.EXE%')) ))

      OR

      and PROCESS.NAME != 'PROCESSA.EXE')) ))
  • Can someone please help me add "OS Name contains Server" into this SQL code? This code is perfect for me except I need to filter it down to only Servers.
    • select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME, UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
      from ORG1.MACHINE LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID
      LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID
      AND KUID_ORGANIZATION.ORGANIZATION_ID = 1 where (( (1 in (select 1 from ORG1.PROCESS, ORG1.MACHINE_PROCESS_JT
      where MACHINE.ID = MACHINE_PROCESS_JT.MACHINE_ID
      and MACHINE_PROCESS_JT.PROCESS_ID = PROCESS.ID and PROCESS.NAME like 'PROCESSA.EXE%')) ))
      AND MACHINE.OS_NAME LIKE '%SERVER%'
      • thank you very much for your prompt reply, much appreciated - I will test this tomorrow
Please log in to comment

Answers

This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.

Answer this question or Comment on this question for clarity
Five Steps for Easier- and More Effective- IT Inventorying
Having an accurate inventory of all your IT assets is critical to ensuring that users are productive and that every dollar is well spent. This white paper outlines five steps that improve inventorying both hardware and software.

Share