Dear reader, I'm not updating these pages anymore. If you have tc or ip related questions, you can post them on the LARTC mailing list.



QOS configurator

Be warned: I'm not working anymore on these scripts. They proved to me that it is possible to write a QOS configurator. I'm probaly going to redo this is in php and maybe with a mysql backend.

What

I wanted to create a GUI for tc. So I merged all my existing scripts in 1 set of scripts. The result is a tc GUI interface to configure htb classes and u32/fw filters. No cbq support. I also have some scripts to monitor the tc setup.
You can use these scripts to created the needed tc commands or only to collect tc stats.

You can download the needed scripts/files in 1 archive: qos.tar.bz2 (see the download section at the end of this page)

The scripts are not finished, so good luck :)

TODO

The graphs are not like I wanted them. I'm experimenting with the rrdtool options to find the best way I can use them.
I also need a configurable overview of the graphs so you can graph what you want.
And I also have to spend some time on the java program for the only graphing.

Web interface installation

I have all the files installed in /qos. This path is hard decoded in the scripts so it's best you extract the scripts also in /qos. So for easy documentation, I suppose you did the same. You can try to install it in an other place, but you have to check each script to change the path.

Installation commands (execute as root, tested on Debian 3.0, apache as web-server) :

cd /
tar xvjf <location of downloaded qos.tar.bz2>
cp `which ip` /qos/bin
cp `which tc` /qos/bin
chmod +s /qos/bin/tc
chown -R <web-server id> /qos/bin/tc
chown <web-server id>: config tmp
echo "include /qos/config/httpd.conf" >> /etc/apache/httpd.conf
/etc/init.d/apache restart
With <web-server id> www-data on a Debian system. Other distributions uses nobody. You can find the user for your system if you run "ps -ef | grep apache" or "ps -ef | grep httpd". It's also possible that the other files (/qos/config/httpd.conf and /etc/init.d/apache) are located on an other place.

Snmp monitor script installation

!!! I rewrote these scripts. It supports a lot more classes, but it's also slower :( !!!

I have a script that can be used together with snmpd so you can get the tc stats on a remote machine. To do so, you have to install the snmpd daemon (apt-get install snmpd on a debian system). Open the file /etc/snmp/snmpd.conf and enable public read only access :

com2sec readonly  default         public

After that, try to query your snmp server with

snmpwalk <server name> public
If this is not working, check the snmp installation.

Next step is adding the following line to /etc/snmp/snmpd.conf :

pass .1.3.6.1.4.1.2021.255 /qos/bin/snmp_tc.pl

After this, restart snmp.
You can test this by executing

$ snmpwalk <server name> public .1.3.6.1.4.1.2021.255 enterprises.ucdavis.255 = "Network interface names" Error: OID not increasing: enterprises.ucdavis.255  = enterprises.ucdavis.255 $ snmpwalk <server name> public .1.3.6.1.4.1.2021.255.0 enterprises.ucdavis.255.0 = "2" Error: OID not increasing: enterprises.ucdavis.255.0  = enterprises.ucdavis.255.0

Or just run /qos/bin/get_snmp.pl and check the file /qos/www/snmp.html :)

snmp script installation bis

The second snmp script is to query the server each 5 minutes and retrieve the tc stats. You can do this with snmp so you can do this on an other server. But the snmp buffer is limited so if you have a lot of classes, it's possible this will not work. As workaround, you can create the graphs on your router so you don't need snmp to get the stats.

get_snmp.pl will query the tc stats, update the rrd file and create a html page with an overview of all available stats. You can run this script from crontab by creating the file /etc/crond.d/tcc and put this line in it :

0-55/5 * * * *  root su - -c /qos/bin/get_snmp.pl

If you provide "snmp" as parameter to the get_snmp.pl script, the script will try to get the tc stats remotely with snmp. The server that needs to be polled can be configured in /qos/modules/qos_config.pm.

After running the /qos/bin/get_snmp.pl script. You should find rrd files in /qos/rrds. These files contains the tc stats.

Config files

Some very important config files are stored in /qos/config. Some of them (main and htb) are only used within the web interfaces. The others are also used in the snmp scripts. The web-server needs read-write access in /qos/config chown -R <web-server id>: /qos/config). All these config files are updated by scripts, so you don't need to edit them.

An other important config file is /qos/modules/qos_config.pm. You have to edit this file to reflect your configuration. See the documentation in the file for more information about the options you can set.

/qos/cgi-bin

This directory must be published with a web-server as /cgi-bin/qos. I provided the needed apache config changes in the dile /qos/config/httpd.conf.

scripts and binary's

In /qos/bin are some scripts and binary's stored.

Other directories/files

What I want to create ....

GUI (Graphical User Interface) to tc

How

Downloads