วันพฤหัสบดีที่ 10 ตุลาคม พ.ศ. 2556

iftop คำสั่งดู Traffice

คำสั่งนี้ใช้ในการดู traffice ของ network


วิธีใช้งาน
iftop -i ethX ใช้ดู traffic ในวงขา Lan
iftop -i pppX ใช้ดู traffic ในวงขา WAN
 

นอกจากนั้นเรายังมี option เพิ่มเติม
-h display this message
-n don't do hostname lookups
-N don't convert port numbers to services
-p run in promiscuous mode (show traffic between other
hosts on the same network segment)
-b don't display a bar graph of traffic
-B Display bandwidth in bytes
-i interface listen on named interface
-f filter code use filter code to select packets to count
(default: none, but only IP packets are counted)
-F net/mask show traffic flows in/out of network
-P show ports as well as hosts
-m limit sets the upper limit for the bandwidth scale
-c config file specifies an alternative configuration file
แต่ที่เด็ดกว่านั้น ยังมี Filtering networks, hosts, and ports ที่ลุงชื่นชอบมากมาด้วย ดังนี้
1) dst host host
2) src host host
3) dst net net
4) src net net
5) dst port port
6) src port port
7) dst portrange start-end
8) src portrange start-end
9) gateway gateway
10) ip proto protocol
ตัวอย่าง
iftop -i eth0 -f “dst host linuxthai.com”
iftop -i eth0 -f “dst port 80″

 http://www.linuxthai.org/showthread.php?18635-iftop-%E0%B8%84%E0%B8%B3%E0%B8%AA%E0%B8%B1%E0%B9%88%E0%B8%87%E0%B8%94%E0%B8%B9-Traffice

ไม่มีความคิดเห็น:

แสดงความคิดเห็น