* Set process data for:
- minflt
- majflt
- processor
- nlwp
* Drop unimplemented nlwp column
* Scan userland threads
* Mark a 'Thread is currently on a CPU.' with 'R', and processes
'Currently runnable' with 'P', do confine with man:ps(1) and Linux.
See https://man.openbsd.org/ps.1
* Show CPU frequency
Currently the tree-view is empty on OpenBSD when kernel threads are
hidden, cause the kernel thread 'swapper' has pid 0 and gets treated as
root of the tree and parent of 'init'.
Do not build any tree with a pid 0 root node.
Do not read driver depended labels, just count the number of
temperatures given:
on #CPU:
platform temp = max cpu temp
CPU temps = first to last
on #CPU + 1:
platform temp = first temp
CPU temps = second to last
on #CPU / 2:
platform temp = max cpu temp
CPU temps = first to last concat first to last
(with SMT core x + cpu count is the logical core of the physical
core x)
on #CPU / 2 + 1:
platform temp = first temp
CPU temps = second to last concat second to last
(with SMT core x + cpu count is the logical core of the physical
core x)
Closes: #529Closes: #538
The hwloc header generates lots of warnings:
In file included from Action.c:10:
In file included from ./Action.h:15:
In file included from ./Header.h:10:
In file included from ./Meter.h:18:
In file included from ./ProcessList.h:25:
In file included from /usr/include/hwloc.h:2371:
/usr/include/hwloc/helper.h:481:5: warning: Value stored to 'state' is never read [deadcode.DeadStores]
state = 3;
^ ~
1 warning generated.
The local stack buffer does not need to be cleaned to zeros when
- just initialized, cause the length is set to 0 and the first
character is set to '\0', so all printing functions will safely stop
- no further used, i.e. the variable goes out of scope
- stay in follow mode on sort inversion (I)
- stay in follow mode after viewing help screen (h)
- select parent process (where available) when having followed a thread
and hiding these (H)
Closes: #560
Combine reading CPU count and CPU usage, only open the file once.
Do not separately initialize totalPeriod and totalTime, cause the value
0 is handled in Platform_setCPUValues().
Take the number of currently running process from the entry
procs_running in /proc/stat instead of counting all scanned process
with state 'R', to include hidden tasks, e.g. threads.
Writing to the file stream might fail due to a immutable file or a
filesystem error.
Check the error indicator for the stream and for fclose() failures.
Code that is shared across some (but not all) platforms
is moved into a 'generic' home. Makefile.am cleanups to
match plus some minor alphabetic reordering/formatting.
As discussed in https://github.com/htop-dev/htop/pull/553
Several of our newer meters have merged coding concerns in terms
of extracting values and displaying those values. This commit
rectifies that for the SysArch and Hostname meters, allowing use
of this code with alternative front/back ends. The SysArch code
is also refined to detect whether the platform has an os-release
file at all and/or the sys/utsname.h header via configure.ac.