PID vs hostname

Bij proxmox kan het gebeuren dat een virtuele machine soms es explodeert qua geheugen/verbruik/…

Met volgende commando’s kom je al een heel eind:

top

PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                                      
47706 root      20   0 11.126g 0.010t   9644 S 377.8  2.7   3670:52 kvm                                                                                                                                          
42711 root      20   0 49.064g 0.047t   9420 S 127.8 12.7  62147:54 kvm                                                                                                                                          
 4369 root      20   0 33.165g 0.025t   9524 S  11.1  6.7  11641:48 kvm                                                                                                                                          
28154 root      20   0 33.124g 0.031t   9344 S  11.1  8.5   2404:39 kvm                                                                                                                                          

Hier zie je bv dat PID 47706 nogal wat geheugen slikt…
Vervolgens zoek je welke machine dit is met de PID in ps:

ps aux | grep 47706

ps axu | grep 47706
root     33569  0.0  0.0  12784   932 pts/0    S+   11:25   0:00 grep 47706
root     47706 37.8  2.6 11666316 10514124 ?   Sl   Oct24 3672:44 /usr/bin/kvm -id 710 -name Doornroosje -chardev socket,id=qmp,path=/var/run/qemu-server/710.qmp,server,nowait -mon chardev=qmp,mode=control -chardev socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5 -mon chardev=qmp-event,mode=control -pidfile /var/run/qemu-server/710.pid -daemonize -smbios type=1,uuid=f28ed901-5160-42c1-82d3-259b3a01e609 -smp 8,sockets=2,cores=4,maxcpus=8 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg -vnc unix:/var/run/qemu-server/710.vnc,x509,password -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 10240 -object memory-backend-ram,id=ram-node0,size=5120M -numa node,nodeid=0,cpus=0-3,memdev=ram-node0 -object memory-backend-ram,id=ram-node1,size=5120M -numa node,nodeid=1,cpus=4-7,memdev=ram-node1 -device pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e -device pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2 -readconfig /usr/share/qemu-server/pve-usb.cfg -device usb-tablet,id=tablet,bus=uhci.0,port=1 -device usb-host,hostbus=1,hostport=1.4.1.3,id=usb0 -device usb-host,hostbus=1,hostport=1.4.4,id=usb1 -device VGA,id=vga,bus=pci.0,addr=

Je kan de maxima aanpassen via

sysctl -w kernel.pid_max=500

of 100, of 32768 (default), of …