GNU bug report logs -
#45729
[PATCH] system_process_attributes for OpenBSD
Previous Next
Reported by: Omar Polo <op <at> omarpolo.com>
Date: Sat, 9 Jan 2021 01:04:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
Hello,
The attached patch implements system_process_attributes for OpenBSD.
With this I am able to use proced \o/
There are five stats that I don't know how to collect (cminflt, cmajflt,
cstime, ctime and thcount). Everything else seem consistent with
top(1).
I avoided to dynamically allocate the args string and instead reused the
existing storage; this is similar to the freebsd code, but if it seems
ugly I can replace that with a calloc+strlcat like in the previous patch
sent to emacs-devel@.
Note: I don't know how sysctl behaves on other systems, but at least on
OpenBSD it's not possible to get the argv for every process. In my
environment only for a couple of process the KERN_PROC_ARGV sysctl
fails. So, it's possible to see some entries with `?' as `args' in
proced, but you can verify that it's "expected" by running "ps $PID" and
see that you get "(executable-name)" under the COMMAND column. (top(1)
seems to just hide them)
Should the patch include an entry in etc/NEWS?
Thanks,
Omar Polo
In GNU Emacs 28.0.50 (build 4, x86_64-unknown-openbsd6.8, X toolkit, cairo version 1.16.0, Xaw scroll bars)
of 2021-01-05 built on venera
Repository revision: ce0c9c349363b5dbea56f7e32c838a93c729263d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: OpenBSD venera 6.8 GENERIC.MP#223 amd64
Configured using:
'configure --prefix=/home/op/opt/emacs --with-x-toolkit=lucid'
[system_process_attribute-2.diff (text/patch, attachment)]
This bug report was last modified 4 years and 134 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.