linux top %MEM含义

其中一个进程的%VSZ为125.7,甚为疑惑,查了下其算法
From BusyBox
top.c- /*
top.c: * %VSZ = s->vsz/MemTotal
top.c- */
vzs is the size of the virtual memory used by the process (from /proc/<pid>/stat). This can include uninitialized memory and memory shared with other processes, and is therefore largely useless to determine how much memory a process actually needs.
MemTotal is found in /proc/meminfo, and is basically how much RAM you have.
该进程的VSZ为311m,设备的内存大小为,相除之后,果然与125.7吻合,是为记录,备忘。

发表评论

邮箱地址不会被公开。 必填项已用*标注