a sysctl for process binary osreldate
Mikolaj Golub
trociny at freebsd.org
Sun Mar 18 07:19:03 UTC 2012
On Sat, 17 Mar 2012 22:29:01 +0100 Jilles Tjoelker wrote:
JT> On Sat, Mar 17, 2012 at 09:30:05PM +0200, Mikolaj Golub wrote:
>> I added osrel output to procstat -b option:
>> kopusha:~% procstat -b 2975
>> PID COMM OSREL PATH
>> 2975 emacs 1000001 /usr/local/bin/emacs-23.3
>> Would this be ok or someone see a better way?
JT> Hmm, this means that procstat is not supposed to be used from scripts as
JT> it is apparently OK to change its output format like this?
Yes, breaking output compatibility worries me too. Although I already broke it
recently for '-s' option, adding umask output. Let me cite Robert (taken from
our then discussion about procstat umask output):
> if we add too many arguments we'll start looking like ps(1), whereas the
> point of procstat(1) is that it's *not* ps(1) :-).
That is why I decided to not introduce yet another option here too at the cost
of breaking compatibility. But I am open for any suggestions.
JT> In some ways, querying via ps would be better for scripts since it
JT> allows things like
JT> ps -p PID -o KEYWORD=
JT> which do not need additional parsing except that many of the newer
JT> things in procstat do not have ps keywords.
JT> --
JT> Jilles Tjoelker
--
Mikolaj Golub
More information about the freebsd-hackers
mailing list