process naming for virtualbox guest instances.
Posted: 1. Apr 2022, 18:14
I'll first apologize if this is duplicated and has been deemed unnecessary or not useful enough or some such. I did a quick, not exhaustive search of the forum and found nothing, so I thought I'd ask.
I have a few machines acting as hypervisors or host machines, or whatever you'd like to call them, they run N number of guest virtualbox (usually headless) instances. on occasion, I end up running a top and see some number of processes at or near the top, something like:
top - 15:50:56 up 2 days, 48 min, 5 users, load average: 3.54, 3.48, 3.45
Tasks: 544 total, 2 running, 542 sleeping, 0 stopped, 0 zombie
%Cpu(s): 6.1 us, 8.2 sy, 0.2 ni, 79.9 id, 4.0 wa, 0.0 hi, 1.8 si, 0.0 st
MiB Mem : 72464.8 total, 31393.6 free, 31438.3 used, 9632.9 buff/cache
MiB Swap: 20974.0 total, 20974.0 free, 0.0 used. 40106.9 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1196676 zep 20 0 9845.7m 1.0g 1.0g S 78.0 1.5 2465:35 VBoxHeadless
1237835 zep 20 0 5590468 951436 407400 S 50.5 1.3 2411:37 firefox
1309851 zep 20 0 3309604 548024 140772 S 43.6 0.7 12:13.83 Isolated Web Co
1206149 zep 20 0 3054096 186628 154164 S 6.9 0.3 314:24.59 VBoxHeadless
1217518 zep 20 0 2166796 72700 53776 S 4.9 0.1 88:19.37 VBoxHeadless
1198403 zep 20 0 6854236 495832 478808 S 4.3 0.7 454:42.78 VBoxHeadless
1209089 zep 20 0 2166796 71952 53164 S 3.0 0.1 88:28.81 VBoxHeadless
1213010 zep 20 0 2109524 552840 533956 S 2.6 0.7 62:20.50 VBoxHeadless
1215379 zep 20 0 2168412 73208 53204 S 2.0 0.1 88:35.91 VBoxHeadless
1216555 zep 20 0 2167896 73332 53452 S 2.0 0.1 88:12.20 VBoxHeadless
it'd be quite nice if those 'VBoxHeadless' processes showed up as the actual name I've given to the vm instead of needing to break out of top and run ps auxww | grep pid, etc.
or for a ... I guess bonus points option, some sort of 'advanced' feature that I could set strings/variables to include in the process name would be awesome.
e.g. set something like "VBprocname=VBH-%n-%M-%C" in the gui settings to get processes named 'VBH-(name)-(memorysize)-(numberOfCpu)' as the process name in ps, top, et al.
but beyond the ask, thanks for making a very useful virtual host tool, I've (possibly over)used it for many years.
thanks.
I have a few machines acting as hypervisors or host machines, or whatever you'd like to call them, they run N number of guest virtualbox (usually headless) instances. on occasion, I end up running a top and see some number of processes at or near the top, something like:
top - 15:50:56 up 2 days, 48 min, 5 users, load average: 3.54, 3.48, 3.45
Tasks: 544 total, 2 running, 542 sleeping, 0 stopped, 0 zombie
%Cpu(s): 6.1 us, 8.2 sy, 0.2 ni, 79.9 id, 4.0 wa, 0.0 hi, 1.8 si, 0.0 st
MiB Mem : 72464.8 total, 31393.6 free, 31438.3 used, 9632.9 buff/cache
MiB Swap: 20974.0 total, 20974.0 free, 0.0 used. 40106.9 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1196676 zep 20 0 9845.7m 1.0g 1.0g S 78.0 1.5 2465:35 VBoxHeadless
1237835 zep 20 0 5590468 951436 407400 S 50.5 1.3 2411:37 firefox
1309851 zep 20 0 3309604 548024 140772 S 43.6 0.7 12:13.83 Isolated Web Co
1206149 zep 20 0 3054096 186628 154164 S 6.9 0.3 314:24.59 VBoxHeadless
1217518 zep 20 0 2166796 72700 53776 S 4.9 0.1 88:19.37 VBoxHeadless
1198403 zep 20 0 6854236 495832 478808 S 4.3 0.7 454:42.78 VBoxHeadless
1209089 zep 20 0 2166796 71952 53164 S 3.0 0.1 88:28.81 VBoxHeadless
1213010 zep 20 0 2109524 552840 533956 S 2.6 0.7 62:20.50 VBoxHeadless
1215379 zep 20 0 2168412 73208 53204 S 2.0 0.1 88:35.91 VBoxHeadless
1216555 zep 20 0 2167896 73332 53452 S 2.0 0.1 88:12.20 VBoxHeadless
it'd be quite nice if those 'VBoxHeadless' processes showed up as the actual name I've given to the vm instead of needing to break out of top and run ps auxww | grep pid, etc.
or for a ... I guess bonus points option, some sort of 'advanced' feature that I could set strings/variables to include in the process name would be awesome.
e.g. set something like "VBprocname=VBH-%n-%M-%C" in the gui settings to get processes named 'VBH-(name)-(memorysize)-(numberOfCpu)' as the process name in ps, top, et al.
but beyond the ask, thanks for making a very useful virtual host tool, I've (possibly over)used it for many years.
thanks.