LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-05-2012, 08:58 AM   #1
Cheerz
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Rep: Reputation: Disabled
Question Graphing Linux QoS - TC command


Hi All

I was wondering if anyone can assist me with the issue I am experiencing.

I have a Centos 6.2 box that is used a traffic shaping/ Qos server. Currently everything is set up and working like a charm. The rate limits etc are in place and by using the command tc -s I can verify the results.

However I need to try and graph the output of the statistics in some way so that we can present this to the guys (non-technical...hence the issue).

Currently we have a dedicated third party WAN monitoring solution in place and was thinking of possibility of using snmp to extract the data from the linux box.

Technical Details:
* tc command used to do the shaping
* qdisc / classes is used along with Hierarchical Token Bucket (HTB)
* Centos 6.2 i386 (Using a Test system at the moment)

Any assistance/ guidance would be appreciated.

Thanks
 
Old 03-06-2012, 02:57 AM   #2
elfenlied
Member
 
Registered: Dec 2004
Posts: 83

Rep: Reputation: 8
What exactly are you looking to graph? I mean you could use a number of tools which read SNMP statistics from your NIC's and graph them over time, is that what you're after?
 
Old 03-06-2012, 03:45 AM   #3
Cheerz
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Hi

I am looking to get the shaping statistics from the qdiscs /classes that was set up by the tc command:

Extract from bash script -

U32="$TC filter add dev $IF protocol ip parent 1:0 prio 1 u32"
TC=/sbin/tc
IF=eth1

MAX_RATE=500kbps
DNLD_RATE=40kbps

$TC qdisc add dev $IF root handle 1: htb
$TC class add dev $IF parent 1: classid 1:1 htb rate $MAX_RATE
$TC class add dev $IF parent 1:1 classid 1:10 htb rate $DNLD_RATE
$TC qdisc add dev $IF parent 1:10 handle 10: sfq perturb 10
$U32 match ip dst $IP/32 flowid 1:10

Using the above and starting a download from the IP address, I can see that the shaping is working.

The data that I want to extract using SNMP is that of the output below:

$TC -s class ls dev $IF

Using the normal SNMP MIBS I can get the statistics on the network interface, but not the detailed statistics on the shaping.
 
Old 03-06-2012, 04:40 AM   #4
elfenlied
Member
 
Registered: Dec 2004
Posts: 83

Rep: Reputation: 8
Have you looked at Cacti? By the looks of it you know what information you want to view over time and with Cacti you should be able to write a script as data source which will output a meaningful value which you can plot over a period of time.

I've created a Cacti graph for a couple of temperature sensors I have which essentially are plotting the output of a script I wrote which reads the sensor and gives me a value (ie 27.1), I then use that to put a line on a graph. You could do something similar for each of the counters you want to keep track of.
 
Old 03-06-2012, 06:40 AM   #5
Cheerz
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
I did look at Cacti, however I need to get the data out using SNMP before I can set up a graph in Cacti.

At the moment I am stuck at getting the SNMP to work.

I'm using the snmp_persist.pl that I found on the Cacti documentation page.
 
Old 03-06-2012, 06:48 AM   #6
elfenlied
Member
 
Registered: Dec 2004
Posts: 83

Rep: Reputation: 8
Your data doesn't have to come from SNMP, it might be easier in your case just to get the data you are after with a script.

See http://docs.cacti.net/manual:087:3a_..._input_methods
 
  


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
Linux QoS with tc tsumaru Linux - Networking 1 03-01-2012 05:58 PM
QoS API in Linux _den Programming 2 05-31-2006 02:53 PM
QoS solution for LInux damista Linux - Networking 1 03-10-2006 03:57 AM
Linux... on a graphing calculator drbroccoli Linux - Hardware 1 09-02-2005 03:22 PM
Linux Router and graphing bandwidth? wkm001 Linux - Software 12 07-08-2004 04:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:54 PM.

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