Problem restoration:
The latest docker container is often killed, and the pod of the node in k8s is also driven away.
Solution:
Use the following command to view all processes that were killed
dmesg | grep -i -B100 'killed process'
View the reason why the pod was evicted:
[3899860.525793] Out of memory: Kill process 64058 (nvidia-device-p) score 999 or sacrifice child [3899860.526961] Killed process 64058 (nvidia-device-p) total-vm:126548kB, anon-rss:2080kB, file-rss:0kB, shmem-rss:0kB
View the docker container Reason for being killed:
[3899859.737598] Out of memory: Kill process 27562 (jupyter-noteboo) score 1000 or sacrifice child [3899859.738640] Killed process 27562 (jupyter-noteboo) total-vm:215864kB, anon-rss:45928kB, file-rss:0kB, shmem-rss:0kB
Check memory usage
tilyp@tilyp:~$ free -h total used free shared buff/cache available Mem: 251G 96G 114G 2.5M 41G 153G Swap: 0B 0B 0B
Recommended tutorial: docker tutorial
The above is the detailed content of How to check the reason why the docker process exited. For more information, please follow other related articles on the PHP Chinese website!