FS#67910 - [monitoring-plugins] check_procs: etime blank
Attached to Project:
Community Packages
Opened by Moabit (Moabit) - Wednesday, 16 September 2020, 12:24 GMT
Last edited by Jonathan Steel (jsteel) - Thursday, 20 October 2022, 10:58 GMT
Opened by Moabit (Moabit) - Wednesday, 16 September 2020, 12:24 GMT
Last edited by Jonathan Steel (jsteel) - Thursday, 20 October 2022, 10:58 GMT
|
Details
Description:
When running check_procs, etime is blank. For example: ``` $ check_procs --metric=ELAPSED -w 120 -c 240 -vv CMD: /usr/bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args' Matched: uid=0 vsz=38752 rss=9524 pid=1 ppid=0 pcpu=0.00 stat=Ss etime= prog=systemd args=/sbin/init ... ``` You can see that etime is not reported, and hence I cannot filter with `--metric=ELAPSED`. I found this Fedora bug report from 12 years ago and tried appending to `./configure` as per the comment [a]: ``` --- PKGBUILD.old 2020-09-16 20:48:14.681258752 +1000 +++ PKGBUILD.new 2020-09-16 22:13:39.126135751 +1000 @@ -36,7 +36,11 @@ ./configure --prefix=/usr --libexecdir=/usr/lib/monitoring-plugins \ --with-ping-command='/usr/bin/ping -4 -n -U -w %d -c %d %s' \ - --with-ping6-command='/usr/bin/ping -6 -n -U -w %d -c %d %s' + --with-ping6-command='/usr/bin/ping -6 -n -U -w %d -c %d %s' \ + --with-ps-command="`which ps` -eo 's 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' make } ``` etime now works perfectly ``` $ check_procs --metric=ELAPSED -w 120 -c 240 -vv CMD: /usr/bin/ps -eo 's uid pid ppid vsz rss pcpu etime comm args' Matched: uid=0 vsz=38752 rss=9528 pid=1 ppid=0 pcpu=0.00 stat=S etime=12:54:36 prog=systemd args=/sbin/init ``` Additional info: * package version(s): monitoring-plugins 2.2-6 [a] https://bugzilla.redhat.com/show_bug.cgi?id=458985#c0 |
This task depends upon
Closed by Jonathan Steel (jsteel)
Thursday, 20 October 2022, 10:58 GMT
Reason for closing: Fixed
Additional comments about closing: Works in 2.3.2-1
Thursday, 20 October 2022, 10:58 GMT
Reason for closing: Fixed
Additional comments about closing: Works in 2.3.2-1