rddtool on WRT54G has anyone scripts?

Discussion in 'Sveasoft Firmware' started by mauce, Dec 8, 2004.

  1. mauce

    mauce Network Guru Member


    As the subject says, I'd like to run rrdtools on my wr54g to provide me the following info:

    - download traffic
    - upload traffic
    - ping stats
    - ?.....

    Furthermore I'm running an apache on a fedora box and would like to have these parameter displayed in graphs.

    I already was able to get this running for my linuxbox stats:

    However, what I'd like to have is this rrdtool also running on my wrt54g and I'd like to have it's results being send to my linuxbox so it can generate the graphs.

    Has anyone rrd-scripts or a solution to share with me (please no rtfm's because that's all what I did so far).
    I'm not a programmer so I can't create something in e.g. perl myself.

    I hope someone can help.

  2. Ivo

    Ivo Network Guru Member

    I am also very interested in such feature ...
  3. Toril

    Toril Network Guru Member

    Ok, I do exactly what you want...

    Here's my crontab:

    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/tftp -p -l /proc/net/dev -r rtr-info.txt <ipaddress> >/dev/null

    So this tftp's out the entire contents of /proc/net/dev to my linux box every 5 mins. On there, I use mrtg-rrd to show the stats. Of course, once the "rtr-info.txt" file exsists on your external linux machine, use it's better horsepower to parse the file (it's usually < 1k).

    Make the target for your mrtg.cfg something like this:

    Target[router]: `grep vlan1 /tftpboot/rtr-info.txt | cut -b 8- | awk '{ print $1"\n"$9}'; echo "\nVlan1 - Router"`

    You can, of course grep out whatever interface you need.

    Pros: No snmpd needed. Works good with minimal setup.

    Cons: Satori's Crond dies whenever my memory gets low (below 1 meg). Needs some understanding of mrtg and rrdtool (and the mrtg-rrd.cgi, of course).

    Take a look at my graphs here.
  4. mauce

    mauce Network Guru Member

    Thanks Toril,

    That's useful information.
    At this stage I have to additional questions.

    1) The ftp server you mentioned to download mrtg-rrd is unreachable (timeout) could you please make it available somewhere else?

    2) I also like to ping 2 or 3 sites and put it in the same graph. Could you hepl me a bit with that?

    3) Did you modify mrtg-rrd.cgi? because mine doesn't work (apache-logs tell me about .rdd files in /var/lib/mrtg which are not existing, I checked this). IF you modified this file, could you tell us WHAT you have change.

    my error in my browser: Error: RRDs::graph failed, opening '/var/lib/mrtg/wrt54g.rrd': No such file or directory
    I tried changing settings in mrtg.cfg and mrtg-rrd.cgi but could not fix this.
    There are no .rrd files generated (I made sure the 'usr lib' is set to the correct path to find RRDs.pm).

    4) Simmilar question as question 3 but then for mrtg.cfg

    I hope you wanna share this with us.

    Thanks in advance
  5. mauce

    mauce Network Guru Member

    Well I;ve got it running for the ethernet intefaces.
    I had to modify the line in your example to:
    Target[wrt54g]: `grep eth1 /tftpboot/rtr-info.txt | cut -b 8- | awk '{ print $1"\n"$9}'; echo "Linksys WRT54G - Internet Traffic"`

    But I still need a solution to this ping-thing.

    Please help


  6. mauce

    mauce Network Guru Member

    HELP!!! :?: :?:

    Can someone provide me a solution for ping PLEASE!!
    Perferrable based on the same method as mentioned above.

    Thanks in advance

  7. mauce

    mauce Network Guru Member

    C'mon guys, I really need some help.
    Can't get this ping stats working.

    PLEASE !!! :?: :?:
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice