htop/netbsd
Explorer09 e99d0daa91 DiskIOMeter: draw normalized utilization; show utilization above 100%
The utilization percentage of DiskIOMeter is an accumulated total of
all disks, and for multiple disks, utilization above 100% is possible.
The maximum utilization should be "100% * number of disks". Set the bar
and graph of the meter to draw with that maximum.

Thanks to Nathan Scott for providing the PCP portion of the patch.

Resolves #1374.

Co-authored-by: Nathan Scott <nathans@redhat.com>
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2024-12-14 16:57:25 +01:00
..
NetBSDMachine.c Fix build in NetBSD. 2024-01-09 09:17:09 +01:00
NetBSDMachine.h Rename ProcessList to ProcessTable throughout 2023-08-31 14:13:16 +10:00
NetBSDProcess.c Remove the special handling for the "Command" column and add a warning that its length should be dynamic 2024-12-10 16:35:40 +01:00
NetBSDProcess.h Introduce Machine class for host-specific info (split from ProcessList) 2023-05-08 13:06:07 +10:00
NetBSDProcessTable.c Refactor the goThroughEntries. 2024-01-09 09:17:09 +01:00
NetBSDProcessTable.h Rename ProcessList to ProcessTable throughout 2023-08-31 14:13:16 +10:00
Platform.c DiskIOMeter: draw normalized utilization; show utilization above 100% 2024-12-14 16:57:25 +01:00
Platform.h Correct pid_t type return from Platform_getMaxPid function 2023-09-04 08:59:41 +10:00
ProcessField.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
README.md doc: Update netbsd/README regarding curses support 2024-09-20 22:28:59 +02:00

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). By default, htop(1) will use ncurses when it is found, as support for NetBSD's curses in htop is limited.

To use NetBSD's libcurses, htop(1) must be configured with --disable-unicode. Starting with htop 3.4.0, a new option --with-curses=curses may be specified to let configure skip ncurses when both libraries are installed.

Technical caveats regarding NetBSD's curses support:

  • htop 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).
  • 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).