cgzones

Results 102 comments of cgzones

hint: https://stackoverflow.com/questions/9948987/detect-current-cpu-clock-speed-programmatically-on-os-x

https://unix.stackexchange.com/a/644209 seems quite interesting, since (modern) containers run in separate Linux namespaces.

We should probably also formulate and document a (htop) definition of container: - a curated list of supported container engines (docker, lxc, podman, ...) - usage of Linux kernel features...

Linux namespaces can be distinguished by their id from the inode number of `/proc//ns/pid`; but that file is unfortunately only readable by root.

An alternative might be to test a set of signal IDs for availability, e.g. via `sigaddset(3)`, and then use the ones not returning EINVAL with the name from `strsignal(3)`.

Since the handling of hugepages is Linux only, maybe the new setting should also be only available on Linux.

> ```diff +static int _sched_setscheduler(pid_t pid, int sched, const struct sched_param *param) { + static const struct sched_param def; + return syscall(SYS_sched_setscheduler, pid, 0, &def); +} ``` Why is the...

Should be fixed with https://github.com/EstebanBorai/local-ip-address/pull/108/commits/63652700de463c25cea00800eb38d3343310a2dd

While rerunning the benchmark I did not notice a significant time saving anymore. Maybe the simplification of `myglob()` made this obsolete.

> Mar 16 22:29:06 ubuntu-jammy kernel: [ 574.926936] audit: type=1400 audit(1679005745.999:72): apparmor="DENIED" operation="capable" profile="snap.htop.htop" pid=2500 comm="bash" capability=2 capname="dac_read_search" htop needs several capabilities for accessing process information, see https://github.com/htop-dev/htop/blob/e207c8aebdcdb88bc8ab838e2ac3dd1774d6a618/linux/Platform.c#L932-L940