Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a series of scripts that are being killed ($? says exit code is 137, which implies a kill -9 scenario). I need to know what process killed them. Is there a way to find out this information?

share|improve this question

I don't believe that there's any way to retrieve the pid of the process that sends the kill, at least from within another process. The signal is sent via a kernel interrupt, and as far as I know, it's only the kernel that knows which process sent it.

That being said, if you're comfortable with patching the kernel to find this out, you might take a look at this: patching the kernel to log signals

share|improve this answer

Exit code 137 references a time out signal.

Read this page on exit codes and signals

I'd also suggest looking for the OOM issue in the /var/log/messages folder.

share|improve this answer
From your link: ... exit code 137 means that the job received a signal 9 ...; this is not a time out signal. – Glen Solsberry Mar 28 '11 at 15:49
forgive me that was under the hypernews section. Have you checked out the /var/log/messages ? – Split71 Mar 28 '11 at 16:58
Yes, and regarding any kills, it is empty. – Glen Solsberry Mar 28 '11 at 17:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.