查找进程通过nohup命令运行 [英] Find the Process run by nohup command
本文介绍了查找进程通过nohup命令运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在运行使用下面的命令在Centos的服务器可执行文件的nohup服务器和放大器;
。现在我需要杀掉进程服务器
。但我试过PS -a
命令来获取 PID
,但我不能让这一进程。现在怎么杀服务器
呢?
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服务器
应返回它具有所有的流程服务器
在其中。否则,服务器可能已经停止。
ps auxwww|grep -i 'server'
should return all process which has server
in them. Otherwise, server may have already stopped.
您应该能够确定PID(并将其存储在一个文件中)如下:
You should be able to determine the PID (and store it in a file) as follows:
nohup server &
print $! >> my_server.pid
这篇关于查找进程通过nohup命令运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文