例:
[root@localhost proc]# ps -aux | wc -l
421
[root@localhost proc]# cat /sys/fs/cgroup/memory/tasks | wc -l
539例:
[root@localhost memory]# free -h
total used free shared buff/cache available
Mem: 11G 425M 9.4G 38M 1.7G 10G
Swap: 2.0G 193M 1.8G
[root@localhost memory]# cat /sys/fs/cgroup/memory/memory.usage_in_bytes
1596362752如上图所示,空闲内存显示为425 M,cgroup显示的内存约为1.4GB?
请注意,只有一个默认的cgroup,没有创建其他cgroup。
发布于 2016-02-12 13:30:39
1)当多线程进程是一个任务时,ps aux输出中只有一行。比较ps -auxH | wc -l
https://unix.stackexchange.com/questions/261692
复制相似问题