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?

Glen Solsberry
  • 1,536
  • 5
  • 28
  • 38

2 Answers2

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

malcolmpdx
  • 2,300
  • 1
  • 16
  • 12
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.

Split71
  • 548
  • 4
  • 9