linux 下通过pid 定位该程序打开的端口
2010-06-18 10:02
417 查看
首先使用ps aux 检测到耗资源的进程。
4652 mysql 15 0 454m 124m 4752 S 58 3.1 2144:29 mysqld
如mysqld。
之后使用网络命令:netstat -anp 来检测该程序链接的端口:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:52422 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 4652/mysqld
tcp 0 0 0.0.0.0:3307 0.0.0.0:* LISTEN 5223/mysqld
4652 mysql 15 0 454m 124m 4752 S 58 3.1 2144:29 mysqld
如mysqld。
之后使用网络命令:netstat -anp 来检测该程序链接的端口:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:52422 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 4652/mysqld
tcp 0 0 0.0.0.0:3307 0.0.0.0:* LISTEN 5223/mysqld
相关文章推荐
- Linux 查看某个程序所在端口的 PID
- Linux下通过端口找到对应的程序
- linux下关闭打开指定端口的程序的脚本
- linux通过端口号(进程号pid)查找程序执行路径
- linux 通过pid 寻找程序路径的最简单命令(pwdx)
- Linux下如何指定某一类型程序用特定程序打开(通过binfmt_misc)
- Linux环境通过java虚拟机定位程序问题位置的方法
- Linux下如何知道某个端口在运行什么程序
- linux 配置防火墙打开 指定 端口
- 根据端口查找占用程序(win/linux/Solaris)
- linux下查端口被哪个程序占用
- Linux查看程序端口占用情况
- [linux基础] 通过进程id获取运行程序的程序名称
- Unity 通过URL来打开远程程序
- linux开启端口命令 iptables 打开 查看
- linux下通过iptables只允许指定ip地址访问指定端口的设置方法
- linux系统中如何通过程序来获知系统信息
- Linux查看程序端口占用情况
- linux系统最大打开文件数和socket端口数限制的坑
- 打开xshell等无法定位程序输入点*于动态链接库nssock2.dll上的问题解决方法