首页 » 系统相关 » About Network stats tools on linux

About Network stats tools on linux

1,bing -c 1 -i 2 localhost 192.168.1.2
Bing determines bandwidth on a point-to-point link by sending ICMP ECHO_REQUEST packets and measuring their roundtrip times for different packet sizes on each end of the link.

2,Iperf
Iperf was developed by NLANR/DAST as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.

3,Netcat

To eliminate the disks from having any part of the transfer, we will use netcat transferring the output of command yes. Netcat is described as being a “feature-rich network debugging and exploration tool”. It can be obtained from Source Forge, or it may already be available in your distribution.

4,bwmon
Linux bandwidth monitor (bwmon) is yet another utility that measures bandwidth utiliazation per interface basis. It is coded in C and takes advantage of POSIX thread and curses library. It runs only on Linux systems since the utility reads /proc/net/dev and /proc/uptime.

5,Bmon

bmon is a bandwidth monitor, intended for debugging and real-time monitoring purposes, capable of retrieving statistics from various input modules. It provides various output methods including a curses based interface. A set of architecture specific input modules provide the core with the list of interfaces and their counters.

6,speedometer

This is an interesting project that permits to display and measure the rate of data across a network connection or data being stored in a file

7,nload

nload is a console application which monitors network traffic and bandwidth usage in real-time. It visualizes the in and outgoing traffic using two graphs and provides more info like total amount of transferred data and min/max network usage. This program uses the Ncurses libraries and so you’ll be able to interact with the mouse in the terminal

8,IPTState
IPTState is a top-like interface to your netfilter connection-tracking table.
Using iptstate you interactively watch where traffic crossing your netfilter/iptables firewall is going, sort by various criteria, limit the view by various criteria. But it doesn’t stop there: as of version 2.2.0 you can even delete states from the table!

9,pktstat
pktstat displays a real-time list of active connections seen on a network interface, and how much bandwidth is being used. Partially decodes HTTP and FTP protocols to show what filename is being transferred. X11 application names are also shown.

10,nc shell

First you will need a ram filesystem. I am running Knoppix now, so the /tmp/ directory is actually mounted in ram
go to one machine (receiving machine) and type

nc -l -p 12345 > /tmp/bwtest

then on the sending machine

time dd if=/dev/zero | nc 1.1.1.1 12345

(1.1.1.1 being the ip of the receiving machine)
wait for half a minute or so, then hit ctrl-c on the sending machine.
Now you have the time of transfer (real)
You can go on the receiving machine and type

ls -lh /tmp/bwtest

And you will get the amount of data received. Divide that by the time, and you get the bandwidth…
On a 100mbps eth crossover link between 2 machines running knoppix, i got 10 megabytes / second.
All the methods above use tools that are usually bundled with the OS.

11,read /proc/net/dev or ifconfig
[root@icme-db ~]# cat net.sh
#!/bin/bash
#ETH=eth0
ETH=”$1″
while : ; do
time=`date +%m”-“%d” “%k”:”%M”:”%S`
day=`date +%m”-“%d`
rx_before=`ifconfig $ETH|sed -n “8”p|awk ‘{print $2}’|cut -c7-`
tx_before=`ifconfig $ETH|sed -n “8”p|awk ‘{print $6}’|cut -c7-`
sleep 2
rx_after=`ifconfig $ETH|sed -n “8”p|awk ‘{print $2}’|cut -c7-`
tx_after=`ifconfig $ETH|sed -n “8”p|awk ‘{print $6}’|cut -c7-`
rx_result=$[(rx_after-rx_before)/256]
tx_result=$[(tx_after-tx_before)/256]
echo “$time Now_In_Speed: “$rx_result”kbps Now_OUt_Speed: “$tx_result”kbps”
sleep 2
done

extend read
disk usage check tool on linux
1,Baobab aka Disk Usage Analyser
2,Cdu
3,JDiskReport
4,Filelight

打赏

对不起,这篇文章暂时关闭评论。