Linux网络状态工具ss命令怎么用
Linux网络状态工具ss命令用法如下:
1. 查看所有连接到本机的socket连接:
ss -a
2. 查看指定端口的socket连接:
ss -a | grep :80
3. 查看TCP连接:
ss -t
4. 查看UDP连接:
ss -u
5. 查看所有处于监听状态的socket连接:
ss -l
6. 查看某个进程相关的socket连接:
ss -p | grep httpd
7. 查看某个IP的socket连接:
ss -o state established '( daddr = 8.8.8.8 )'
8. 查看某个端口的socket连接:
ss -o state established '( sport = :http or dport = :http )'
9. 查看某个用户的socket连接:
ss -o state established '( uid = 1000 )'
10. 查看某个进程的socket连接:
ss -o state established '( pid = 1234 )'
11. 查看某个socket连接的详细信息:
ss -o state established '( sport = :http or dport = :http )'
12. 查看某个IP的socket连接的详细信息:
ss -o state established '( daddr = 8.8.8.8 )'
13. 查看某个端口的socket连接的详细信息:
ss -o state established '( sport = :http or dport = :http )'
14. 查看某个用户的socket连接的详细信息:
ss -o state established '( uid = 1000 )'
15. 查看某个进程的socket连接的详细信息:
ss -o state established '( pid = 1234 )'
相关文章