LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-18-2009, 06:34 PM   #1
masenko703
Member
 
Registered: May 2003
Posts: 33

Rep: Reputation: 15
Bandwidth usage


Hi all,
This might sound like a noob question but I was wondering what is the command to monitoring bandwidth usage? I have this is server at work that keeps going down every week but its b/c they saturate their bandwidth. What other command can I run to monitor server resources. thanks.
 
Old 01-18-2009, 09:52 PM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Maybe
Code:
# iptables -L -v
will do.
Or maybe you'd like vnStat better.
 
Old 01-18-2009, 10:18 PM   #3
masenko703
Member
 
Registered: May 2003
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks for the reply but one more question. I ran the following command like you suggested on my CentOS VM server and i received the following results:

# iptables -L -v

Chain INPUT (policy ACCEPT 214 packets, 13643 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 231 packets, 16217 bytes)
pkts bytes target prot opt in out source destination


Could you please break it down and explain the above? Thanks again.
 
Old 01-18-2009, 10:29 PM   #4
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Rep: Reputation: 51
Try out
Code:
iperf
iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics.
 
Old 01-18-2009, 10:30 PM   #5
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Rep: Reputation: 51
Install iperf

If you are using Debian / Ubuntu Linux, enter:
$ sudo apt-get install iperf
If you are using FreeBSD, enter:
# cd /usr/ports/benchmarks/iperf
# make install clean
Source code installation for RHEL / CentOS:
# gunzip -c iperf-.tar.gz | tar -xvf -
# cd iperf-
# make; make install
Start iperf on server

To start iperf on server, type the following command:
freebsdbox # /usr/local/bin/iperf -s
Output:

------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------

Test iperf from client

Let us connect to our freebsdbox, enter:
$ iperf -c freebsdbox
Output (note my freebsdbox is on slow vsat link):

------------------------------------------------------------
Client connecting to freebsdbox, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.106 port 40256 connected with 71.zzz.xxx.yyy port 5001
[ 3] 0.0-10.7 sec 624 KBytes 480 Kbits/sec

The last line (the red numbers) specifies the speed.
Use UDP rather than TCP

The -u option force to use UDP. The following example run udp test and bandwidth to send at in bits/sec is specified using the -b option:
$ iperf -c rhelbox -u -l 512 -b 10m
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor bandwidth usage and attempted usage! Depressed_amphibian Linux - Networking 3 06-15-2006 07:13 AM
Unknown bandwidth usage trueguy2001_in Linux - General 1 02-17-2006 11:58 AM
Hiding Bandwidth Usage RemusX2 General 2 07-16-2005 04:04 AM
total bandwidth usage chongluo Linux - General 9 09-26-2004 08:32 PM
How to find bandwidth available ... not usage? russell Linux - Networking 3 09-15-2001 12:07 PM


All times are GMT -5. The time now is 06:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration