There is no general way to know, but you may have clues.
You sent a TERM signal, not a KILL signal, so that left the program the opportunity to run a signal handler. It might not have died at all, or it might have left a log entry somewhere. Check whether the process is still running (ps 2302
), and if not, check your system logs.
There is a log of all processes if you have process accounting enabled. This is available on Linux through GNU acct, but with most distributions the package is not installed by default. If process accounting is enabled, run lastcomm
(you may need to be root) to see the recently killed processes (latest first). With lastcomm
, only the command name is tracked, not the PID or the arguments; you'll have to figure out which process it is by circumstantial matching. Under Linux, lastcomm
shows the date the process exited but only with a granularity of 1 minute, and there is an X
flag after the command name if the command was killed by a signal.
GNU acct tracks more information, including the process ID, but the lastcomm
command doesn't display it: you have to run dump-acct
, which unfortunately does not indicate whether a command was killed by a signal.
dump-acct /var/log/account/pacct | awk -F '|' '$10 ~ / *2302($| )/'
There are other subsystems that can log processes, such as Linux's audit, but they are usually not configured to do so.
find / -name someApp.py
? – ott-- Jan 25 '13 at 13:55pkill -f someApp
. – jordanm Jan 25 '13 at 15:22