iptraf 好用 yum install iptrafiptraf is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet,load info, node stats, IP checksum errors, and others.If the command is issued without any command-line options, the PRogram comes up in interactive mode, with the various facilities accessed through the main menu.
ipband
nethogs安裝nethogsyum -y install nethogs(1)、可以實時查看系統當前進程的流量(2)、可以和nload結合起來,可以診斷出很多問題。如果要將這些數據記錄到日志里,可以使用下面的命令:nethogs -b | tee log.txt
nload 不自帶 簡單直觀wget http://www.roland-riegel.de/nload/nload-0.7.2.tar.gztar zxvf nload-0.7.2.tar.gzcd nload-0.7.2./configure;make;make install使用直接用nload回車即可,也可以指定網卡,如nload eth1還可以指定是以K或M來顯示流量,如nload -u M顯示的流量是以MB為單位的看看還有哪些參數或選項[root@wdlinux ~]# nload -u K[root@wdlinux ~]# nload -hifstat 不自帶 簡單直觀Ifstat is a little tool to report interface activity, just like iostat/vmstat do for other system statistics.ifstat gathers these statistics from the kernel internal counters, which is highly Operating system dependent.Right now, the following systems are supported: Linux >= 2.2.0 (through /proc/net/dev file). FreeBSD >= 2.2 (using the ifmib(4) interface). Solaris >= 5.6 (using the kstat(3K) interface). IRIX and OpenBSD (using the SIOCGIFDATA ioctl). NetBSD and Darwin (using the route(4) sysctl interface). Other BSDs (using the kvm(3) interface). Digital Unix (OSF/1), Tru64, and Aix (using the legacy kmem interface). HP-UX (using the DPLI streams interface). Win32 native or through Cygwin (using the GetIfTable call). wget -S http://gael.roualland.free.fr/ifstat/ifstat-1.1.tar.gztar zxvf ifstat-1.1.tar.gzcd ifstat-1.1./configuremake;make installifstat
iftop 不自帶
安裝庫文件,需要 libpcap 及 libcurses 。yum install -y flex byacc libpcap ncurses ncurses-devel libpcap-devel
wget -S http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gztar zxvf iftop-0.17.tar.gzcd iftop-0.17
./configure make;make install使用iftop -i eth1 -Biftop -i eth2 -B -m 30Miftop -n -i eth1
iftop -i eth0 -n -P 顯示端口號http://jiajun.CUOxin.com/blog/419515watch ifconfigwatch more /proc/net/devwatch -n 1 "/sbin/ifconfig eth0 | grep bytes"ulimit -n
[root@CactiEZ ~]# netstat -s[root@CactiEZ ~]# sar -n DEV 1[root@CactiEZ ~]# sar -n EDEV 1 2-n參數很有用,他有6個不同的開關:DEV | EDEV | NFS | NFSD | SOCK | ALL 。DEV顯示網絡接口信息,EDEV顯示關于網絡錯誤的統計數據,NFS統計活動的NFS客戶端的信息,NFSD統計NFS服務器的信息,SOCK顯示套接字信息,ALL顯示所有5個開關。它們可以單獨或者一起使用。rxerr/s:每秒鐘接收的壞數據包 txerr/s:每秒鐘發送的壞數據包 coll/s:每秒沖突數 rxdrop/s:因為緩沖充滿,每秒鐘丟棄的已接收數據包數 txdrop/s:因為緩沖充滿,每秒鐘丟棄的已發送數據包數 txcarr/s:發送數據包時,每秒載波錯誤數 rxfram/s:每秒接收數據包的幀對齊錯誤數 rxfifo/s:接收的數據包每秒FIFO過速的錯誤數 txfifo/s:發送的數據包每秒FIFO過速的錯誤數
|
新聞熱點
疑難解答