Linux 通过os进程pid找到端口号
2015-03-05 15:42
288 查看
[root@localhost ~]# netstat -tulpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 3338/./hpiod tcp 0 0 0.0.0.0:736 0.0.0.0:* LISTEN 3098/rpc.statd tcp 0 0 127.0.0.1:37094 0.0.0.0:* LISTEN 4418/ocssd.bin tcp 0 0 0.0.0.0:54955 0.0.0.0:* LISTEN 4919/ora_d000_orcl tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 3058/portmap tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 4974/tnslsnr tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3358/sshd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 3369/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3404/sendmail tcp 0 0 127.0.0.1:43259 0.0.0.0:* LISTEN 4418/ocssd.bin tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 3343/python udp 0 0 127.0.0.1:33429 0.0.0.0:* 4418/ocssd.bin udp 0 0 127.0.0.1:20633 0.0.0.0:* 4921/ora_s000_orcl udp 0 0 0.0.0.0:21080 0.0.0.0:* 3763/avahi-daemon udp 0 0 127.0.0.1:13017 0.0.0.0:* 4891/ora_pmon_orcl udp 0 0 0.0.0.0:730 0.0.0.0:* 3098/rpc.statd udp 0 0 0.0.0.0:733 0.0.0.0:* 3098/rpc.statd udp 0 0 127.0.0.1:7394 0.0.0.0:* 4418/ocssd.bin udp 0 0 0.0.0.0:5353 0.0.0.0:* 3763/avahi-daemon udp 0 0 127.0.0.1:63341 0.0.0.0:* 4418/ocssd.bin udp 0 0 0.0.0.0:111 0.0.0.0:* 3058/portmap udp 0 0 0.0.0.0:631 0.0.0.0:* 3369/cupsd udp 0 0 127.0.0.1:16633 0.0.0.0:* 4919/ora_d000_orcl udp 0 0 127.0.0.1:61818 0.0.0.0:* 4418/ocssd.bin
下面根据os进程id(4974)检查使用的端口号:
[root@localhost ~]# netstat -nap | grep 4974 tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 4974/tnslsnr tcp 0 0 127.0.0.1:1521 127.0.0.1:11798 ESTABLISHED 4974/tnslsnr unix 2 [ ACC ] STREAM LISTENING 15990 4974/tnslsnr /var/tmp/.oracle/s#4974.1 unix 2 [ ACC ] STREAM LISTENING 15992 4974/tnslsnr /var/tmp/.oracle/s#4974.2 unix 3 [ ] STREAM CONNECTED 14974 4663/gconfd-2 [root@localhost ~]#
相关文章推荐
- Linux 通过os进程pid找到端口号
- 就是通过端口号 找到pid 然后把进程kill的批处理
- linux通过端口号(进程号pid)查找程序执行路径
- 记录linux通过端口号找到进程id
- linux通过端口号查看进程名
- Linux通过PID查看进程完整信息
- Linux/macOS 获取进程PID、杀死进程
- Linux通过PID查看进程完整信息
- shell通过端口号获取PID(进程号)
- Linux根据端口号查看进程PID
- 通过进程PID找到其占用的端口
- 通过端口号查找进程号并杀掉进程window和Linux版本
- linux通过端口号杀进程
- Linux中怎么通过PID号找到对应的进程名及所在目录方法
- Linux下通过端口号查询占用的进程,并知道其所在的位置
- Linux通过PID查看进程完整信息
- [linux]centos下通过pid查看进程的绝对路径的方法
- 通过获取系统进程快照获取进程pid以及杀进程(win下获取进程名和linux下获取进程路径)
- Linux中怎么通过PID号找到对应的进程名及所在目录
- Linux通过PID查看进程完整信息