Is it possible to have a smart label that looks for computers running a certain Process?
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
Answers (1)
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%')) ))
Comments:
-
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. - jobla 12 years ago
-
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. - dugullett 12 years ago
-
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? - bnerison 10 years ago
-
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. - jcaine 10 years ago
-
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%' - dugullett 10 years ago-
thank you very much for your prompt reply, much appreciated - I will test this tomorrow - jcaine 10 years ago