6f2021f3d9
Implements support for arbitrary Performance Co-Pilot metrics with per-process instance domains to form new htop columns. The column-to-metric mappings are setup using configuration files which will be documented via man pages as part of a follow-up commit. We provide an initial set of column configurations so as to provide new capabilities to pcp-htop: including configs for containers, open fd counts, scheduler run queue time, tcp/udp bytes/calls sent/recv, delay acct, virtual machine guests, detailed virtual memory, swap. Note there is a change to the configuration file path resolution algorithm introduced for 'dynamic meters'. First, look in any custom PCP_HTOP_DIR location. Then iterate, in priority order, users home directory, then local sysadmins files in /etc/pcp/htop, then readonly configuration files below /usr/share/pcp/htop. This final location becomes the preferred place for our own shipped meter and column files. The Settings file (htoprc) writing code is updated to not using the numeric identifier for dynamic columns. The same strategy used for dynamic meters is used here where we write Dynamic(name) so the name can be setup once more at start. Regular (static) columns writing to htoprc - i.e. numerically indexed - is unchanged. |
||
---|---|---|
.. | ||
NetBSDProcess.c | ||
NetBSDProcess.h | ||
NetBSDProcessList.c | ||
NetBSDProcessList.h | ||
Platform.c | ||
Platform.h | ||
ProcessField.h | ||
README.md |
README.md
NetBSD support in htop(1)
This implementation utilizes kvm_getprocs(3), sysctl(3), etc, eliminating the need for mount_procfs(8) with Linux compatibility enabled.
The implementation was initially based on the OpenBSD support in htop(1).
Notes on NetBSD curses
NetBSD is one of the last operating systems to use and maintain its own implementation of Curses.
htop(1) can be compiled against either ncurses or NetBSD's curses(3).
In order for NetBSD's libcurses to be used, htop(1) must be configured with
--disable-unicode
. This is necessary because htop(1) with Unicode enabled
directly accesses ncurses's cchar_t struct, which has different contents
in NetBSD's curses.
Versions of libcurses in NetBSD 9 and prior have no mouse support (this is an ncurses extension). Newer versions contain no-op mouse functions for compatibility with ncurses.
What needs improvement
- Kernel and userspace threads are not displayed or counted - maybe look at NetBSD top(1).
- Battery display - use envsys(4).
- Support for compiling using libcurses's Unicode support.
- Support for fstat(1) (view open files, like lsof(8) on Linux).
- Support for ktrace(1) (like strace(1) on Linux).