Skip to content

Instantly share code, notes, and snippets.

@ibreathebsb
Created September 15, 2018 09:22
Show Gist options
  • Save ibreathebsb/ebfd711d6a5a4ba1a7cbe61bddc2943c to your computer and use it in GitHub Desktop.
Save ibreathebsb/ebfd711d6a5a4ba1a7cbe61bddc2943c to your computer and use it in GitHub Desktop.

netstat

参数

  • -a 列出所有连接数据
  • -t tcp
  • -u udp
  • -n 列出端口号
  • -p 列出PID
@ibreathebsb
Copy link
Author

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:36060         127.0.0.1:1080          TIME_WAIT   -
...
# Recv-Q  接受队列,已经收到的数据包但未被一个用程序处理
# Send-Q  发送队列,已经发送但是未收到ACK的
```shell                  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment