Ticket #9087 (new enhancement)

Opened 7 years ago

Linux: Please optimize output of VBoxHeadless in "top"

Reported by: deller Owned by:
Priority: minor Component: VM control
Version: VirtualBox 4.0.8 Keywords:
Cc: Guest type: other
Host type: Linux


On a Linux host the "top" program is a great tool to see how many resources (memory, CPU usage,...) are used by various Linux processes
But when running multiple headless virtual machines on one physical server it's not possible to see which virtual machine is using how many resources. Instead every virtual machine process is visible as "VBoxHeadless" process (which is of course in principle correct).

My proposal and trivial feature request:
In VBoxHeadless code on Linux, could you please add a call to "prctl(PR_SET_NAME, _VIRT_MACHINE_NAME_)", so that the "top" program can report the real VM name?

Current example of "top" with 3 virtual machines:

top - 22:52:30 up 14:45,  4 users,  load average: 0.22, 0.09, 0.11
Tasks: 262 total,   1 running, 261 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.0%us, 11.4%sy,  1.0%ni, 86.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   8194156k total,  8141484k used,    52672k free,    33564k buffers
Swap:  8388604k total,        0k used,  8388604k free,  1826788k cached

10097 root      20   0 3380m 2.1g 2.1g S 14.0 26.9  13:57.83 VBoxHeadless
10181 root      20   0 2790m 1.6g 1.5g S  8.0 20.1   3:53.61 VBoxHeadless
10141 root      20   0 2618m 1.5g 1.5g S  1.3 19.7   2:38.39 VBoxHeadless

Now, if the VBoxHeadleass process was started as "VBoxHeadless --comment MY_VMACHINE --startvm 2d576-6b3-48-9f-333333 --vrde config", with the proposed prctl() call, one of the "VBoxHeadless" processes above would instead show up as "MY_VMACHINE".

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use