 Mihai Claudiu Capatina <mick@aignet.ro> 
 aka Mick

 This is a small script that I use on FreeBSD machines running ALTQ 
 This machines acts like a traffic management system and I need to see 
 the traffic for each class ( CBQ ) 

 All you need to change in this script is the path to "altqstat"
 and the name of the interfaces

 In my case fxp0 is connected to my LAN and fxp1 is connected to my ISP
 so...I measure on fxp0 the download and on the fxp1 the upload for each class

 This script has only one parameter....this is the class number assigned 
 by ALTQ. 

 If you want to use this script I suppose that you already instaled ALTQ
 In any case do "altqstat -w 0 -c 2 -i your_interface" to see what your
 class number is...for each class

 If you want to count packets instead of bytes change the st line of the script
 instead of $octeti_down and $octeti_up put $pakete_down and $pakete_up

 You will call this script from mrtg.conf like this :
 Target[name]: `/your/path/to/my/script/stfc [class_number]
  - name - can be an ip address or a client name or whatever you want
  - class_number - explained above...

 VERY IMPORTANT : always define classes in the same order for upload and 
                  download...so they will have the same class number 

 If you need additional information please feel free to mail me...I'll be glad
 to help you...;-))

Mick <mick@aignet.ro>
