How can I check why a process was stopped / killed in Ubuntu?
I know using dmesg I can check if a process is killed by OS.
But can some one let me know if the process is killed by a user, how can I know which user killed the process?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
The only solution to your question that I can think of (assuming that you know the details of the process) would be to parse the history file of those users that would have the permissions necessary to terminate the process in question for a command that would terminate it.
This would of course require that you have permission to access the users in question .bash_history file. And would also require that the user in question was oblivious as to how to or didn't bother to turn off their own history.
I consider the odds of both of these conditions being met highly unlikely, so perhaps this comment is more accurate in the real world.
However, regardless of the likelihood of both these conditions being met, it is possible.