| 用途 | 实时连接与进程对应 |
|---|---|
| 常用 | ss -tunap / ss -tnp state established |
示例
示例
ss -tunap
ss -tnp state established '( sport = :22 )'
ss -s非 root 运行只能看到自身进程信息,现场采集用 root。
ss 取代 netstat 成为主流连接查看工具:-t 看 TCP、-u 看 UDP、-p 带进程、-n 不做名称解析,可一次得到“谁连了哪里”。
| 用途 | 实时连接与进程对应 |
|---|---|
| 常用 | ss -tunap / ss -tnp state established |
ss -tunap
ss -tnp state established '( sport = :22 )'
ss -s