lsof 查看端口占用的进程ID

1. nohup execute >/dev/null 2>&1 & 提交了一个后台jobs

2. 然后查看一下 哪个进程正在用

3. yum 安装lsof

yum install lsof -y

4. 查看进程信息

lsof -i:7000

5. 效果为:

COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
frps    29431 root    3u  IPv6 223994      0t0  TCP *:afs3-fileserver (LISTEN)
frps    29431 root    7u  IPv6 225330      0t0  TCP 45.62.117.86.16clouds.com:afs3-fileserver->58.56.96.30:37732 (ESTABLISHED)
frps    29431 root   12u  IPv6 226601      0t0  TCP 45.62.117.86.16clouds.com:afs3-fileserver->58.56.96.30:61211 (ESTABLISHED)
[root@host ~]# 

猜你喜欢

转载自www.cnblogs.com/jinanxiaolaohu/p/10267597.html
今日推荐