The linux kernel recently gained a new PSI meter, namely
a new /proc/pressure/irq meter has been added [1]:
full avg10=0.00 avg60=0.00 avg300=0.00 total=100648410
This commit adds support for this PSI meter by adding a
PressureStallIRQFullMeter_class.
[1] 52b1364ba0
It's an artefact of the previous implementation of
Platform_getProcessLocks for Linux, and is never used;
there's no reason for it to have ever been exported
Instead of filtering the global /proc/locks by PID-that-locked
(which is different than the process that holds it for inherited
flock(2)s and always literal -1 for fcntl(F_OFD_SETLK)s),
just look at the locks on open files
For a process with:
$ head /proc/$$/fdinfo/{9,10,11}
==> /proc/797393/fdinfo/9 <==
pos: 0
flags: 0100000
mnt_id: 2775
lock: 1: FLOCK ADVISORY WRITE 818754 00:69:7 0 EOF
==> /proc/797393/fdinfo/10 <==
pos: 0
flags: 0100000
mnt_id: 127
lock: 1: FLOCK ADVISORY WRITE 828244 00:30:509028 0 EOF
lock: 2: OFDLCK ADVISORY READ -1 00:30:509028 0 199
==> /proc/797393/fdinfo/11 <==
pos: 0
flags: 0100000
mnt_id: 2775
lock: 1: FLOCK ADVISORY WRITE 935925 00:69:1187 0 EOF
Instead of:
No locks have been found for the selected process.
I now observe:
1 FLOCK ADVISORY WRITE 00:30:00000000000000509028 0 <END OF FILE> /home/nabijaczleweli/.feeds
1 FLOCK ADVISORY WRITE 00:69:00000000000000000007 0 <END OF FILE> /home/nabijaczleweli/uwu/mart.html
1 FLOCK ADVISORY WRITE 00:69:00000000000000001187 0 <END OF FILE> /home/nabijaczleweli/uwu/removedfile (deleted)
2 OFDLCK ADVISORY READ 00:30:00000000000000509028 0 199 /home/nabijaczleweli/.feeds
This also fixes an obvious issue where the filename for fd 0 would
never be resolved
This includes:
- Wrap function implementations
- Pointer alignment for function signatures
- Pointer alignment for variable declarations
- Whitespace after keywords
- Whitespace after comma
- Whitespace around initializers
- Whitespace around operators
- Code indentation
- Line break for single line statements
- Misleading alignment
CRT.c:1015:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
void CRT_done() {
^
void
At the moment this is used to make the memory meter report sane values even
if the host has ZFS and that leaks through into a containerized environment
Fixes#863
Includes a clever check for magic PROC_PID_INIT_INO in /proc/self/ns/pid thanks to Pavel Snajdr (snajpa)
Not all batteries entries in /sys/class/power_supply start with either
BAT or AC, but might have device specific names, e.g. CMB1.
Detect the types of those entries and parse them accordingly.
Closes: #881
Fixes: 3e70de64 ("Code clean up for reading battery info")
This is real, physical memory available for applications to
use. We should not try to pretend otherwise; its confusing
for users and inconsistent with all other tools.
Generalize sub-diskname handling, like sdb1/sdb2, to not count the
usage twice with the aggregate top-diskname, like sdb.
Rely on /proc/diskstats being ordered, e.g. no sub-diskname precedes its
top-diskname.
Closes: #675
Adds AGRP (autogroup) and ANI (autogroup nice) columns that
report the information from /proc/PID/autogroup, as well as
handlers for '{' and '}' to change the autogroup nice value.
This is guarded by /proc/sys/kernel/sched_autogroup_enabled
such that sampling and/or changing values wont be attempted
unless the kernel feature is enabled.
Fixes: #720
Currently htop does not support offline CPUs and hot-swapping, e.g. via
echo 0 > /sys/devices/system/cpu/cpu2/online
Split the current single cpuCount variable into activeCPUs and
existingCPUs.
Supersedes: #650
Related: #580
The libcap code is Linux-specific so move it all below
the linux/ platform subdirectory. As this feature has
custom command-line long options I provide a mechanism
whereby each platform can add custom long options that
augment the main htop options. We'll make use this of
this with the pcp/ platform in due course to implement
the --host and --archive options there.
Related to https://github.com/htop-dev/htop/pull/536
On Linux kernels the size of the values exported for block
device bytes has used a 64 bit integer for quite some time
(2.6+ IIRC). Make the procfs value extraction use correct
types and change internal types used to rate convert these
counters (within the DiskIO Meter) 64 bit integers, where
appropriate.
On Linux kernels the size of the values exported for network
device bytes and packets has used a 64 bit integer for quite
some time (2.6+ IIRC). Make the procfs value extraction use
correct types and change internal types used to rate convert
these counters (within the NetworkIO Meter) 64 bit integers,
where appropriate.