網絡技術日誌
關於 PHP, Linux, Open Source 及個人生活記載的網誌。
-
Linux 流量分析的指令
Posted on January 10th, 2007 3 comments在高流量的 Linux server 下分析流量十分有用,以下是幾個有用的指令:
1. 列出每個連線 IP 的連線數量:
netstat -nta | fgrep "ESTABLISHED" | cut -b 49-75 | cut -d ':' -f1 | sort | uniq -c | sort -n -r –key=1,7 | head -25
2. 列出每個 IP 的 SYN_RECV 連線數量:
netstat -nta | fgrep "SYN_RECV" | cut -b 49-75 | cut -d ':' -f1 | sort | uniq -c | sort -n -r –key=1,7 | head -25
3. 列出 connection state 的連線數量:
netstat -nta | fgrep ":" | cut -b 77-90 | sort | uniq -c
3 responses to “Linux 流量分析的指令”
-
[...] 參考來源:Real-Blog Linux流量分析的指令 [...]
-
[...] http://www.real-blog.com/linux-bsd-notes/323 [...]
-
[...] Linux 流量分析的指令 – Real-Blog (tags: Tech Linux Network Tips) [...]
Leave a reply
-
