Natanael Copa

Results 207 comments of Natanael Copa

I have applied this to lxc-6.0.0 in Alpine Linux but it does not seem to solve the issue. ``` # lxc-top Unable to read cgroup item memory.kmem.usage_in_bytes Unable to read...

I was not able to reproduce the segfault on a clean/fresh system. It happened on a relatively new server with containers imported from old system. That said, `lxc-top` does not...

The patch was backported to the alpine 3.20 package, so it is included in `lxc-6.0.0-r3` and later: https://github.com/alpinelinux/aports/commit/1b2d32887a8dbb6a119f5c5d9078d60346bdffa7

Please also note that the units for CPU stats are different. In cgroups v1 it is nanoseconds and USER_HZ. In v2 it is usec. And there is currently a bug....

> @ncopa, is it okay if I merge your branch into mine and fix the cpu stat issue? Sure!

Good catch on the kernel mem fix! I missed that in the docs. The [lxc-info PR](https://github.com/lxc/lxc/pull/4426) calculates it differently and can probably be simplified. You have the kernel docs into...

this also fixes https://github.com/lxc/lxc/issues/4337

I found another bug in `lxc-top` with `-b`. The `ct_print_cnt` should probably be ignored with `batch` mode. ```diff diff --git a/src/lxc/tools/lxc_top.c b/src/lxc/tools/lxc_top.c index 6cb38bb90..7498331ee 100644 --- a/src/lxc/tools/lxc_top.c +++ b/src/lxc/tools/lxc_top.c @@...

Yes, I believe it is due to: https://github.com/lxc/lxc/pull/4439#issuecomment-2250154083 I debugged it and `ct_print_cnt` was `-3`, so nothing was printed.

Also, when running in qemu, diskless, there is no disk io, which gave "Unable to get CPU stats", where "CPU" was a copy/paste typo of "IO". You can do: `git...