/build/static/layout/Breadcrumb_cap_w.png

Systems Management Question


Is it possible to have a smart label that looks for computers running a certain Process?

09/19/2012 4427 views

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.


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

All Answers

This content is currently hidden from public view.
Reason: Removed by member request For more information, visit our FAQ's.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ