0

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?

1

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

0

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.

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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