Monitoring Long process names on Solaris

Jeffery P. Humes jeff at bofus.org
Tue Mar 16 17:44:30 CET 2004


I am pretty new to the nagios scene. I am trying to monitor long named 
processes on Solaris 8.

I can monitor processes with the "check_procs" plugin:

------
check_procs -c 1:1 -C 
"/opt/bea/jdk131_08/bin/../bin/sparc/native_threads/java" -a -ms384m

OK - 1 processes running with command name 
/opt/bea/jdk131_08/bin/../bin/sparc/native_threads/java, args -ms384m
------

This works fine.

However, I run into a problem with processes that have very long names 
and the name I want to watch is near the end of the string.

example:
bea      28402  0.2 20.6581704102648 ?        S   Mar 03 1050:18 
/opt/bea/jdk131_08/bin/../bin/sparc/native_threads/java -ms384m -mx384m 
-Xrs -XX:MaxPermSize=128M -XX:MaxNewSize=128M -XX:SurvivorRatio=8 -Xrs 
-Dcommerce.properties=/opt/bea/weblogic7/portal/weblogiccommerce.properties 
-Dejbruntime.appserver=weblogic61 -Dejbruntime.config=weblogicportal40 
-Dejbruntime.database=oracle817thin 
-Dcom.compoze.home=/opt/ti_apps/portal/educationDomain/lib/ext/compoze 
-classpath 
/opt/ti_apps/portal/educationDomain/lib/ext/classes12.zip:/opt/ti_apps/portal/educationDomain/settings:/opt/ti_apps/portal/educationDomain/lib/ext/autonomyClient.jar:/opt/ti_apps/portal/educationDomain/lib/startup/startup.jar:/opt/ti_apps/portal/educationDomain/lib/ext/adc.jar:/opt/ti_apps/portal/educationDomain/lib/ext/Utilities.jar:/opt/ti_apps/portal/educationDomain/lib/ext/struts.jar:/opt/ti_apps/portal/educationDomain/lib/ext/commons-fileupload.jar:/opt/ti_apps/portal/educationDomain/lib/ext/jakarta-regexp-1.2.jar:/opt/ti_apps/portal/educationDomain/lib/ext/log4j-1.2.8.jar:/opt/ti_apps/portal/educationDomain/settings/compoze/license:/opt/ti_apps/portal/educationDomain/lib/ext/oro-2.0.4/oro-2.0.4.jar:/opt/ti_apps/portal/educationDomain/lib/ext/compoze/security.jar:/opt/ti_apps/portal/educationDomain/lib/ext/compoze/csdk.jar:/opt/ti_apps/portal/educationDomain/lib/ext/compoze/j2ee_runtime.jar:/opt/ti_apps/portal/educationDomain/lib/ext/compoze/discussion.jar:/opt/bea/weblogic7/server/lib/weblogic.jar:/opt/bea/weblogic7/server/lib/webservices.jar:/opt/bea/weblogic7/portal/lib/p13n_system.jar:/opt/bea/weblogic7/portal/lib/ext/jdom.jar:/opt/bea/weblogic7/portal/lib/ext/HTTPClient.jar:/opt/bea/weblogic7/portal/lib/ext/wlcsparsers.jar:/opt/bea/weblogic7/portal/lib/commerce_system.jar:/opt/bea/weblogic7/portal/lib/campaign_system.jar:/opt/bea/weblogic7/server/lib/jdom.jar:/opt/bea/weblogic7/portal/lib/portal_system.jar:/opt/bea/jdk131_08/lib/tools.jar:/opt/bea:/opt/bea/weblogic7/portal/lib/commerce_system.jar:/opt/bea/weblogic7/portal/lib/campaign_system.jar 
-Dweblogic.Name=portal_ms1 -Dbea.home=/opt/bea 
-Dweblogic.management.username= -Dweblogic.management.password= 
-Dweblogic.management.server=http://ncapp10.eps.ti.com:9501 
-Dweblogic.ProductionModeEnabled=true 
-Djava.security.policy=/opt/bea/weblogic7/server/lib/weblogic.policy 
weblogic.Server


I believe that the problem is the "ps" command that is called only show 
partial process strings.

How can I either:
1. get the check_procs command to use "/usr/ucb/ps auxww" instead of 
"/usr/bin/ps"?
2. find some other way to monitor processes by name?

Thanks for any assistance.

-Jeff Humes


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list