[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45729: [PATCH] system_process_attributes for OpenBSD
From: |
Omar Polo |
Subject: |
bug#45729: [PATCH] system_process_attributes for OpenBSD |
Date: |
Fri, 08 Jan 2021 19:59:56 +0100 |
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
Description: Text Data
- bug#45729: [PATCH] system_process_attributes for OpenBSD,
Omar Polo <=