[MacPorts] #28801: nagios-plugins 1.4.15 check_procs broken, fixed on Sourceforge

MacPorts noreply at macports.org
Wed Mar 16 19:17:05 PDT 2011


#28801: nagios-plugins 1.4.15 check_procs broken, fixed on Sourceforge
-------------------------------------+--------------------------------------
 Reporter:  sonikbuddha@…            |       Owner:  markd@…           
     Type:  defect                   |      Status:  new               
 Priority:  Normal                   |   Milestone:                    
Component:  ports                    |     Version:  1.9.2             
 Keywords:                           |        Port:  nagios-plugins    
-------------------------------------+--------------------------------------

Comment(by sonikbuddha@…):

 In my configure, I passed no arguments.  Its interesting that the source
 package that you've pulled does not have the same defaults.  I spelunked a
 bit through what I had and found this.  Please be patient, I rarely dig
 into the build process or have troubleshoot issues beyond passing
 configure arguments.

 From my local build that I made from the Sourceforge package, my
 config.log lists
 | #define PS_VARLIST
 procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos
 | #define PS_COMMAND "/bin/ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm
 command'"
 | #define PS_FORMAT "%s %d %d %d %d %d %f %s %n"
 | #define PS_COLS 9

 And the config.h:
 /* Number of columns in ps command */
 #define PS_COLS 9

 /* Verbatim command to execute for ps in check_procs */
 #define PS_COMMAND "/bin/ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm
 command'"

 /* Format string for scanning ps output in check_procs */
 #define PS_FORMAT "%s %d %d %d %d %d %f %s %n"

 /* Whether the ps utility uses the "procetime" field */
 /* #undef PS_USES_PROCETIME */

 /* Variable list for sscanf of 'ps' output */
 #define PS_VARLIST
 procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos

 Taking your advice, based on this, I changed
                         --with-ps-command="/bin/ps -axwo 'stat uid pid
 ppid vsz rss pcpu etime comm args'" \
                         --with-ps-format="%s %d %d %d %d %d %f %s %s %n" \
                         --with-ps-cols=10 \
                         --with-ps-
 varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos"
 to
                         --with-ps-command="/bin/ps -axwo 'stat uid pid
 ppid vsz rss pcpu ucomm command'" \
                         --with-ps-format="%s %d %d %d %d %d %f %s %n" \
                         --with-ps-cols=9 \
                         --with-ps-
 varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos"
 And rebuilt.

 The result worked:
 check_procs -C bash -vvv
 CMD: /bin/ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'
 ...
 PROCS OK: 1 process with command name 'bash'

 Just because I was worried that there was no configure option for proctime
 (which I removed from the ps args list), I compared my config.h to the
 macports config.h I just generated and the lines match.  I can share the
 config.log/config.h/Makefile, if necessary.

 I hope this helps.

-- 
Ticket URL: <https://trac.macports.org/ticket/28801#comment:9>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list