Discussion:
Monitor multiple occurrences of an OS process
bothunbr
2012-04-23 22:02:38 UTC
Permalink
bothunbr [http://community.zenoss.org/people/bothunbr] created the discussion

"Monitor multiple occurrences of an OS process"

To view the discussion, visit: http://community.zenoss.org/message/66015#66015

--------------------------------------------------------------
Hello everyone,

Does anyone know how to monitor for multiple occurrences of an OS process? I have a java process run 20 instances of the same program. The output of #ps aux looks like:

| 1001 | 17635  0.2  0.6 1406780 314800 pts/3  Sl   12:25   0:43 /opt/jdk1.5.0_14-32/bin/java -cp /opt/java2330/libycprod.jar com.process.ManualUploadListProcessor |
| 1001 | 17639  0.2  0.6 1406780 314800 pts/3  Sl   12:25   0:43 /opt/jdk1.5.0_14-32/bin/java -cp /opt/java2330/libycprod.jar com.process.ManualUploadListProcessor |
| 1001  | 5018  0.0  0.7 1424648 379256 ?  Sl   Apr20   3:25 /opt/jdk1.5.0_14-32/bin/java -cp /opt/java2330/libycprod.jar com.process.ManualUploadListProcessor |
|

I want to my check to not only check to see if its running but check to see if 20 of them are running.

Any ideas?

Thanks!
--Brad
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/66015#66015]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
themactech
2012-04-24 01:11:39 UTC
Permalink
themactech [http://community.zenoss.org/people/themactech] created the discussion

"Re: Monitor multiple occurrences of an OS process"

To view the discussion, visit: http://community.zenoss.org/message/66016#66016

--------------------------------------------------------------
Couldn't you parse the PS output to count the number of processes running?

Manuel
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/66016#66016]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2012-04-24 01:13:57 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: Monitor multiple occurrences of an OS process"

To view the discussion, visit: http://community.zenoss.org/message/66017#66017

--------------------------------------------------------------
If you define the regex properly it should model each instance of the process. Then as long as you have them set to monitored it will alert if any of them are not available.

Now this breaks down if you have say 25 instances and are willing to tolerate 5 failures. However if there are always exactly 20 instances, and you want to know if a single one is gone, the native OS process monitoring should work.


That said processing monitoring in 3.2.1 blows chunks..... so your probably better off writing a simple shell script.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/66017#66017]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...