I'm trying to figure out which specific Python process or executable was killed by the Linux OOM killer.
In /var/log/messages I get this:
Aug 18 03:19:11 169 kernel: [ 7747] 0 7748 3226957 2875051 5692 0 0 python
(notice it just say name = "python")
Aug 18 03:19:11 169 kernel: Killed process 7748 (python) total-vm:12907828kB, anon-rss:11500204kB, file-rss:0kB
(again notice it just says the process was "python")
Ideally a log file for the process would have the PID somewhere. But suppose the logs wrapped (or suppose the process doesn't log the PID anywhere).
Does Linux provide a way to figure out the full command that was executed for the process? It would be nice to configure Linux's OOM killer to display the full name in the process table, such as:
Or maybe at the time of the OOM error Linux stores off some of the process details somewhere? i.e. copy the processes from /proc to X? (wishful thinking)
This question is very similar to this question: https://stackoverflow.com/questions/624857/finding-which-process-was-killed-by-linux-oom-killer
But it fell short of what I'm trying to figure out.