linux查询进程被kill的日志 oom killer
OOM Killed
Linux内核有个机制叫OOM killer(Out Of Memory killer),该机制会监控那些占用内存过大,尤其是瞬间占用内存很快的进程,然后防止内存耗尽而自动把该进程杀掉,内核检测到系统内存不足
log
"Out of memory" /var/log/messages
"Killed process"
#filter logs
egrep -i -r 'out of memory' /var/log/messages //-i ignore case -r 逆序
egrep -i -r 'out of memory' /var/log/
egrep -i -r -v "level=debug" /var/log/messages