Home  >  Article  >  Operation and Maintenance  >  How to check the reason why the docker process exited

How to check the reason why the docker process exited

王林
王林Original
2020-04-15 09:35:154564browse

How to check the reason why the docker process exited

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn