Date: Thu, 24 Sep 2020 12:06:09 +1000 From: Dewayne Geraghty <dewayne@heuristicsystems.com.au> To: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: ps values with a "-", inexplicable? Message-ID: <9d6f278f-935d-322e-b40e-52622d56052b@heuristicsystems.com.au>
next in thread | raw e-mail | index | archive | help
While parsing process information, things failed when expected numerical values returned a "-". Can anyone explain why they have a hyphen value? I would expect a zero if unused ... Examples # ps -ax -o pid,ppid,inblk,oublk,msgrcv,msgsnd,majflt,pri,nswap,nvcsw,nivcsw,command -p 6553 PID PPID INBLK OUBLK MSGRCV MSGSND MAJFLT PRI NSWAP NVCSW NIVCSW COMMAND 6553 1 - - - - - 52 - - - adjkerntz -i I first noticed the hyphens when a parser complained due to the parent openkim returning hyphens similar to the above, but after a process restart and two days of running the opendkim is returning an expected: # ps -ax -o pid,ppid,inblk,oublk,msgrcv,msgsnd,majflt,pri,nswap,nvcsw,nivcsw,command |grep opendkim 49616 1 0 0 0 0 0 52 0 2 0 /usr/local/sbin/opendkim -l -p /var/run/milteropendkim/sock -u dkim:mailnull -P /var/run/milopendkim/pid -x /usr/local/etc/opendkim.conf Any insight appreciated? My objective is to examine processes that demonstrate excessive resource use, and if the hyphens indicate no value, or for my purposes zero resources then should I simple convert hyphens to zeros without loosing information? This is on FreeBSD 12.2-STABLE FreeBSD 12.2-STABLE #0 r365645M: amd64 1202500 1202500
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9d6f278f-935d-322e-b40e-52622d56052b>