I deploy six java program in linux server,some was killed. I know that I can use the command grep "Killed process" /var/log/messages to find which process killed by the linux-kernel.But how can I find that the pid belong to my java program.It may be belong to other java program in the same server.The result is:
Aug 21 17:05:22 TEST_SERVER kernel: Killed process 2403, UID 700, (java) total-vm:19970440kB, anon-rss:7472436kB, file-rss:356kB
Aug 21 17:05:22 TEST_SERVER kernel: Killed process 2405, UID 700, (java) total-vm:19970440kB, anon-rss:7472456kB, file-rss:212kB
Aug 21 17:05:22 TEST_SERVER kernel: Killed process 2511, UID 800, (oracle) total-vm:26509852kB, anon-rss:48836kB, file-rss:4992488kB
What I have tried:
I know that use cd /proc/{pid} can find the pid detail,but now my process was killed, and I use the command it says can not find the file or catalog. I also look at the messages,but still nothing to do.
Out of memory: Kill process 2403 (java) score 114 or sacrifice child
Aug 21 17:05:22 TEST_SERVER kernel: Killed process 2403, UID 700, (java) total-vm:19970440kB, anon-rss:7472436kB, file-rss:356kB
Aug 21 17:05:22 TEST_SERVER kernel: java invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
Aug 21 17:05:22 TEST_SERVER kernel: java cpuset=/ mems_allowed=0
Aug 21 17:05:22 TEST_SERVER kernel: Pid: 22393, comm: java Not tainted 2.6.32-504.el6.x86_64 #1