I run a server executable in Centos using the following command "nohup server &"
. Now I need to kill the process "server"
. But I tried "ps -a"
command to get the PID
but I couldnt get the process. Now how to kill the "server"
now?
ps auxwww|grep -i 'server'
should return all process which has server
in them. Otherwise, server may have already stopped.
You should be able to determine the PID (and store it in a file) as follows:
nohup server &
print $! >> my_server.pid