LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-23-2003, 09:09 PM   #1
slack66
Member
 
Registered: Jul 2003
Location: manila
Distribution: slackware 8 to 9
Posts: 199

Rep: Reputation: 30
bandwithd measurement


iam connected to a wireless broadband internet and aim getting 12kbps thats my internet provider told me. but iam doubt coz if aim downloading files its to slow??? and my isp told me to upgrade to 64kbps ....but how can i be sure that iam getting the right bandwithd that aim paying for??? is there in linuxbox that monitor speed of my bandwithd???
 
Old 09-23-2003, 09:21 PM   #2
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Setup (in and out) counter rules on your firewall, and write a small script that periodically reads the counters.
I did the same some days before (with ipfw on FreeBSD) and catched our ISP in providing us half of the bandwidth we pay for. They were very sorry for the mistake...

Here is the script I use with ipfw:

#!/usr/local/bin/bash
IPFW=/sbin/ipfw
AWK=/usr/bin/awk
GREP=/usr/bin/grep
DATE=/bin/date
CAT=/bin/cat
TAIL=/usr/bin/tail
IDO=`date +"%Y%m%d%H%M"`
CNTOUT=`$IPFW -a l | $GREP -E "^00350" | $AWK '{ printf $3 "\n" }'`
CNTIN=`$IPFW -a l | $GREP -E "^00351" | $AWK '{ printf $3 "\n" }'`
LASTOUT=`$TAIL -1 /var/log/nettraffic | $AWK '{ printf $2 "\n" }'`
LASTIN=`$TAIL -1 /var/log/nettraffic | $AWK '{ printf $3 "\n" }'`
CUROUT=`expr $CNTOUT - $LASTOUT`
CURIN=`expr $CNTIN - $LASTIN`
echo $IDO $CNTOUT $CNTIN $CUROUT $CURIN >> /var/log/nettraffic

Do not forget to refer to your firewall manual on how to setup and read counter rules, and correct the above script accordingly. Also check the command paths in the script, since they may be FreeBSD specific. If you run the script by cron in each minute, it will generate a logfile with the following data on each line: time, out counter position, in counter position, out traffic, in traffic. Anyway, the peaks in the traffic log file will show you the actual speed of your network connection.

Last edited by J_Szucs; 09-23-2003 at 09:53 PM.
 
  


Reply



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
CPU Usage measurement in Linux bassi Linux From Scratch 1 07-20-2005 04:11 AM
traffic measurement Baltasar Linux - Software 5 03-10-2005 11:53 AM
Fixed file measurement Cyberian Fedora 0 01-20-2005 09:46 PM
Bandwidth measurement Erik Thorsson Linux - Software 2 01-10-2005 09:07 AM
Protocol Performance Measurement Smooth Linux - Networking 2 08-12-2004 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:22 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration