[Nagiosplug-devel] [nagios-plugins] check_procs: On solaris10 args field empty but ps -ef shows args (#1203)

eponymous alias eponymousalias at yahoo.com
Wed Oct 16 07:30:38 CEST 2013


Something's amiss with your command line.  First of all, you can't execute that command without quoting the expression.  If you don't, your shell will interpret the "*" character, try to expand it as part of a glob, and you'll get nothing back.

Second, the command you list here in this email doesn't include a couple of the "*" characters shown in the forum item:

 ./check_procs -c 1:1 --ereg-argument-array=.*java.*-Dname.*

Putting all of this together, running a small test program named "java" (that just sleeps forever) with the arguments you present:

% ps -o args | fgrep java | fgrep -v fgrep
/tmp/procs/java -Dprogram.name=run.sh -server -Dname=xyz -Xms4096m -Xmx4096m -X
% check_procs -c 1:1 --ereg-argument-array='.*java.*-Dname.*'
PROCS OK: 1 process with regex args '.*java.*-Dname.*' | procs=1;;1:1;0;

which is to say, it works for me.

I happen to be running this using the Nagios Plugins 1.5 on Solaris 10, for comparison.

--------------------------------------------
On Mon, 10/14/13, dmikulski <notifications at github.com> wrote:

 Subject: [Nagiosplug-devel] [nagios-plugins] check_procs: On solaris10 args field empty but ps -ef shows args (#1203)
 To: "nagios-plugins/nagios-plugins" <nagios-plugins at noreply.github.com>
 Date: Monday, October 14, 2013, 11:55 PM
 
 There is probably a bug which I can't
 take a deeper debugging on because I don't have the
 knowledge how to.
 
 There is a service running on my solaris10 sparc machine
 which with 'ps -ef | grep java' shows:
 
 javauser 3775 1 0 Oct 08 ? 283:36
 /usr/jdk/latest/bin/amd64/java -Dprogram.name=run.sh -server
 -Dname=xyz
 
 Trying:
 
 ./check_procs -c 1:1
 --ereg-argument-array=.java.-Dname.*
 
 results in:
 
 PROCS CRITICAL: 0 processes with regex args
 '.java.-Dname.*'
 
 Debugging with:
 
 ./check_procs -c 1:1
 --ereg-argument-array=.java.-Dname.* -vvv | grep
 java
 
 results in:
 
 S 1995 3775 1 0 0 0.3 java proc#=0 uid=1995 vsz=0 rss=0
 pid=3775 ppid=1 pcpu=0.30 stat=S etime= prog=java args=
 
 S 0 22707 18750 4292 1032 0.0 grep grep javaproc#=0 uid=0
 vsz=4292 rss=1032 pid=22707 ppid=18750 pcpu=0.00 stat=S
 etime= prog=grep args=grep java
 
 S 0 22706 18750 4440 1224 0.0 check_procs ./check_procs -c
 1:1 --ereg-argument-array=.java.-Dname.*
 -vvvproc#=0 uid=0 vsz=4440 rss=1224 pid=22706 ppid=18750
 pcpu=0.00 stat=S etime= prog=check_procs args=./check_procs
 -c 1:1 --ereg-argument-array=.java.-Dname.*
 -vvv
 
 Processlist comes from
 /opt/csw/libexec/nagios-plugins/pst3
 
 Running 'pargs 3775':
 
 3775: /usr/jdk/latest/bin/amd64/java -Dprogram.name=run.sh
 -server -Dname=xyz
 
 argv[0]: /usr/jdk/latest/bin/amd64/java
 
 argv[1]: -Dprogram.name=run.sh
 
 argv[2]: -server
 
 argv[3]: -Dname=xyz
 
 argv[4]: -Xms4096m
 
 argv[5]: -Xmx4096m
 
 argv[6]: -Xmn512m
 
 argv[7]: -Dorg.apache.lucene.maxClauseCount=4096
 
 argv[8]: -Xloggc:/home/xyz/log/GC.log
 
 argv[9]: -XX:MaxPermSize=512m
 
 argv[10]: -Dsun.net.client.defaultConnectTimeout=60000
 
 argv[11]: -Dsun.net.client.defaultReadTimeout=60000
 
 argv[12]: -XX:+PrintGCTimeStamps
 
 argv[13]: -XX:+PrintGCDateStamps
 
 argv[14]: -XX:+PrintGCDetails
 
 argv[15]: -Dsun.rmi.dgc.server.gcInterval=3600000
 
 argv[16]: -Dsun.rmi.dgc.client.gcInterval=3600000
 
 argv[17]: -XX:+UseParNewGC
 
 argv[18]: -Dsun.net.inetaddr.ttl=10
 
 argv[19]: -DMaSystem.simple=true
 
 argv[20]:
 -Dproperties.decorator.class=com.materna.buc.macs.basics.properties.MacsPropertiesWrapper
 
 argv[21]: -Dmacs.home=/home/xyz
 
 argv[22]: -Djava.awt.headless=true
 
 argv[23]: -Djava.endorsed.dirs=/home/xyz/jboss/lib/endorsed
 
 argv[24]: -classpath
 
 argv[25]:
 /home/xyz/jboss/bin/run.jar:/usr/jdk/latest/lib/tools.jar
 
 argv[26]: org.jboss.Main
 
 argv[27]: -c
 
 argv[28]: all
 
 argv[29]: --partition=xyzPartition
 
 argv[30]: --udp=215.116.3.6
 
 argv[31]: -Djava.net.preferIPv4Stack=true
 
 argv[32]: -b
 
 argv[33]: 192.168.234.212
 
 uname -a
 
 SunOS host1 5.10 Generic_118855-36 i86pc i386 i86pc
 
 Everything was run as root user!
 
 The forum thread below:
 http://www.monitoring-portal.org/wbb/index.php?page=Thread&threadID=29552
 
 —
 Reply to this email directly or view
 it on GitHub.
 -----Inline Attachment Follows-----
 
 ------------------------------------------------------------------------------
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application
 performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more.
 Get the most from 
 the latest Intel processors and coprocessors. See abstracts
 and register >
 http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
 -----Inline Attachment Follows-----
 
 _______________________________________________________
 Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net
 Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
 ::: Please include plugins version (-v) and OS when
 reporting any issue. 
 ::: Messages without supporting info will risk being sent to
 /dev/null




More information about the Devel mailing list