On Ubuntu 12.04/Java 1.7
I have been reading/searching about OOM killer and generally understood what "proc" man page says especially oom_adj part. It all started because my important "MQ listeners" are getting killed.
We have a master listener process that listens for MQ messages and spawns a new job using same jar file, different command line arguments. It uses Runtime.getRuntime().exec to fire the job.
Whole thing is ran as a very low privileged user - a user that does not have any other permissions.
My concern is OOM score for the listener process keeps increasing because it keeps spawning the process and eventually gets killed assuming that java exec call uses fork internally.
How do I change oom_adj value for a process fired by low privileged user? Otherwise it will mean that all folks who can deploy the jar file need to have sudo permissions.
Is there any call/file I can use to get OOM scores of all jobs to find out which one is likely to be killed? Looking for report similar to what get logged in syslog file but without actually killing the jobs