Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

The number of processes seems to be wrong in VE

20 bytes added, 11:36, 11 March 2008
m
Robot: Automated text replacement (-VE +container)
<pre>
[root@HN ~] # vzlist
VPSID CTID NPROC STATUS IP_ADDR HOSTNAME
1001 63 running xx.yy.136.88 promo.HN.com
1002 12 running xx.yy.138.6 video.HN.com
</pre>
As you see, the number is false for [[VEcontainer]] 1001 and 1003, but is correct for [[VEcontainer]] 1002 (14 = 12 + 1 (wc command) + 1 (ps command)).
==Disclosure==
The thing is that <tt>ps aux</tt> command outputs only "full-fledged" processes, but not threads. And `vzlist` command counts all processes in [[VEcontainer]] including threads. <tt>ps -eLf</tt> command allows you to see all processes:
<pre>
[root@HN ~] # vzctl exec 1001 ps -elf eLf | wc -l
65
[root@HN ~] # vzctl exec 1002 ps -elf eLf | wc -l
14
[root@HN ~] # vzctl exec 1003 ps -elf eLf | wc -l
26
</pre>
2,253
edits