[Bug 14716] New: top -m doesn't report highest memory consummer
bugzilla at busybox.net
bugzilla at busybox.net
Tue Mar 29 13:25:50 UTC 2022
https://bugs.busybox.net/show_bug.cgi?id=14716
Bug ID: 14716
Summary: top -m doesn't report highest memory consummer
Product: Busybox
Version: 1.33.x
Hardware: Other
OS: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: frederic.delabre at non.se.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
Hi,
Is there a reason why "top" and "top -m" use a different way of computing VSZ ?
When I run "top -m" as a regular user, it doesn't report some processes because
it fails to compute their VSZ (Virtual Memory Size).
This happens not only on root processes, but also on some of the user processes
(java in my case).
Looking into the code, I found that "top" and "top -m" have a different method
of computing VSZ. Howerever, "top -m" needs permissions to read
"/proc/XX/smaps" and failed to get the VSZ for some processes. VSZ is set to 0
and the proces is ignored.
Is there a reason for doing so ?
in procps/top.c, function top_main(), around line 1201:
[I removed many lines]
IF_FEATURE_TOPMEM(if (scan_mask != TOPMEM_MASK)) {
top[n].vsz = p->vsz;
}
else { /* TOPMEM */
topmem[n].vsz = p->smaps.mapped_rw + p->smaps.mapped_ro;
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list