主題:
[轉貼]Linux 流量分析的指令
[打印本頁]
發表人:
yjmg
時間:
2007-10-6 09:09 PM
主題:
[轉貼]Linux 流量分析的指令
在高流量的 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
歡迎光臨 TWed2k (http://twed2k.org/)
Powered by Discuz! 4.1.0