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

MacPorts noreply at macports.org
Wed Mar 16 19:24:41 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@…):

 Ah, missed the wiki formatting.  More readable:

 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'
 }}}

 The rest you can gather from above (next time I'll preview)

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


More information about the macports-tickets mailing list