I'm running a nohup process on the server. When I try to kill it my putty console closes instead.
this is how I try to find the process ID:
ps -ef |grep nohup
this is the command to kill
kill -9 1787 787
I'm running a nohup process on the server. When I try to kill it my putty console closes instead.
this is how I try to find the process ID:
ps -ef |grep nohup
this is the command to kill
kill -9 1787 787
when you create a job in nohup it will tell you the process ID !
the output will show you the process ID like
you can kill it then :
I am using red hat linux on a VPS server (and via SSH - putty), for me the following worked:
First, you list all the running processes:
Then in the first column you find your user name; I found it the following three times:
Then in the second column you can find the PID of the nohup process and you only type:
(replacing the PID with the nohup process's PID of course)
And that is it!
I hope this answer will be useful for someone I'm also very new to bash and SSH, but found 95% of the knowledge I need here :)
suppose i am running ruby script in the background with below command
then i can get the pid of above background process by specifying command name. In my case command is ruby.
output
Now you can easily kill the process by using kill command
I started django server with the following command.
This works on CentOS: