0

I have server running with nohup on port 80. I try

ps aux | grep nohup

and get

root 9234 0.0 0.1 11740 932 pts/1 S+ 15:19 0:00 grep --color=auto nohup

I then try kill -9 11740 (which I believe is the PID) and get an error stating 'no such process." I can't figure out how else to remove this. Any help is appreciated. Thanks

KM617
  • 137
  • 1
  • 3
  • 16
  • 1
    This is interesting and may be helpful: http://stackoverflow.com/questions/17385794/how-to-get-the-process-id-to-kill-a-nohup-process?rq=1 – Dan Jan 25 '16 at 20:38
  • You try to kill the `grep` process that is already terminated (see the command on the right of the output). – Jean-Baptiste Yunès Jan 25 '16 at 20:43

2 Answers2

1
  1. 11740 is virtual memory size. PID is the second field, 9234.
  2. The process in your output is grep command itself, not nohup.
  3. You won't see standalone nohup process. When you start some process with nohup my_executable, nohup closes/redirects stdin/stdout/stderr properly, setups necessary signal handlers and replaces itself with my_executable. Search instead for executable which was started with nohup, e.g. ps aux | grep my_executable | grep -v grep
gudok
  • 4,029
  • 2
  • 20
  • 30
0

The process you are seeing is the process from your grep command. So by the time you are trying to kill it, the process is already over.

To keep it out of the output use:

ps aux | grep nohup | grep -v 'grep'

It looks like you don't have a nohup process running

Dan
  • 10,614
  • 5
  • 24
  • 35