Results 1 to 15 of 76

Thread: Trouble with RRDTool and updated uClibc

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2005
    Location
    Slovakia
    Posts
    73

    RrdTool - I donīt need graph

    I donīt need graph generated by rrdtool, i need only a simple webpage whit this:

    ................Today.......This week.......This month
    wlan...........64MB...........564MB............2354MB
    pc1............47MB...........345MB............1005MB
    pc2............09MB...........123MB............0547MB
    pc3............08MB...........096MB............0802MB

  2. #2
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    377
    Modify the package on your own ?
    Seems no one else is interrested in this at the moment.
    For my own, i would like to see something like text stats inbuild to the web interface, but at the moment, no interrest to do it .

    Greets
    My Stuff: WL-500g, Mapower H31x 10GB HD, Philips Webcam Vesta PRO, TerraTec Webcam PRO, USB Hub

  3. #3

    Post Trouble with RRDTool and updated uClibc

    Hi,
    I had some problems with rrdtool and updated uClibc. So what i am done.
    1. Prepared my harddrive for extended packages.
    2. Update ipkg as said on http://www.nslu2-linux.org/wiki/FAQ/Optware-uClibcBuild
    3. Using tutorial on http://wl500g.info/showpost.php?p=18494&postcount=1 install rrdtool
    All step done without errors. But when rrtool.sh script try create rrd data file it`s freezed down. I figure out that rrdtool.sh stopped on `rrdtool create "${1}" etc.`.

    Anyone can help me with it or recommend some alternative programms for statistics collection?

  4. #4
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    rrdtool is the only one giving me a trouble. I am looking for a ways to resolve this issue, but it looks like that isnan() function is constantly called in a loop.

    I supose there is a bug in rrdtools or some building info or maybe uclibc problem.

    I have native compiled libpng, libart_lgpl, freetype, zlib and rrdtool but produced the same resulting lock up.

    Strangely
    rrdtool create load.rrd DS:sysload:GAUGE:600:U:U RRA:AVERAGE:0.5:1:48
    works, while
    rrdtool create loadavg.rrd --step 60 DS:load1:GAUGE:120:0:U \
    DS:load5:GAUGE:120:0:U DS:load15:GAUGE:120:0:U RRA:AVERAGE:0.5:1:2160
    locks up
    Last edited by oleo; 20-12-2006 at 12:58. Reason: added more info

  5. #5
    oleo, thanks for reply.

    But when call rrdtool with different params, it create a file.

    For example.

    rrdtool create temperature.rrd --step 300 \
    DS:temp:GAUGE:600:-273:5000 \
    RRA:AVERAGE:0.5:1:1200 \
    RRA:MIN:0.5:12:2400 \
    RRA:MAX:0.5:12:2400 \
    RRA:AVERAGE:0.5:12:2400

    Do you know some similar packages for collect statistic data?

  6. #6
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Could you possibly find isolated example that fails. Currently I am creating debug version of rrdtools natively to be debuged on router. And I need minimal example.

  7. #7
    What do you mean by isolated example?

    Work
    rrdtool create test.rrd \
    DS:inERIVE:600:U:U \
    RRA:AVERAGE:0.5:1:600

    not work
    rrdtool create test1.rrd \
    DS:inERIVE:600:0:125000000 \
    RRA:AVERAGE:0.5:1:600

    May be some problems in min max value?


    ps
    it doesnt like MIN = 0
    Last edited by _Denis_; 20-12-2006 at 13:25.

  8. #8

    rrdtool 1.0.50 ipk

    Can anyone point me to a rrdtool 1.0.50 ipk file, the one that doesn't freeze when rendering certain graphics? All the repositories I've seen seem to include only recent versions.

  9. #9
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Install http://wl500g.dyndns.org/7g/ and then try again

  10. #10

  11. #11
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    7

    RRDTool won't run

    Hi!

    My problem is that the log file is empty and the directories "RRD" under: "/opt/share/www" and "/opt/var/lib/" aren't created. I therefore cannot monitor

    I've installed RRDTool via ipkg and that works. I have followed macsats cronguide and tested with the 5 minutes test script in the same guide.
    That test script works as well (i have it placed in /opt/etc/cron.5mins/).

    I was unable to use the default dir "/opt/usr/bin" since it didn't exist. I've tried although by creating that dir and placing the script there but that didn't help.
    I've also tried changing the default dir to "/opt/bin" in the script and also placing the script in there. No luck there I'm afraid.

    I have the "rrdrun.sh" script inside /opt/etc/cron.5mins/ and I it's executable.


    I'm using lighttpd and perhaps that affects everything?
    Since I'm unable to copy text from Putty I have included a printscreen of my currently running processes.

    I hope someone might know what this is. Would love to get this working please!
    Attached Images Attached Images  

  12. #12
    Join Date
    Nov 2007
    Location
    EU's border...
    Posts
    71
    Quote Originally Posted by tzd99 View Post
    ...
    Since I'm unable to copy text from Putty I have included a printscreen of my currently running processes.
    ...
    Hi,
    I can only help you with your putty problem...
    Select what you want to copy and press Ctrl+Insert. And then paste it in putty with "Shift+Insert", or Ctrl+V in Windows.
    Or use, for example:
    ps axf > /opt/ps.txt

  13. #13
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    7
    I can paste into putty but not the other way around (copy from putty). Tried via ctrl+insert but taht didn't help I'm afraid. Thanks for your reply though

    UPDATE: just found out there's some issues with the linux version. Also found out i could use Konsole instead..... now that was a lot easier than puTTY
    Last edited by tzd99; 05-07-2008 at 00:57.

  14. #14

    Exclamation Wl-700g and RRDTOOL

    Has installed on wl-700 rrdtool.
    The Server lighttpd and php and cron are installed and work.

    I try to start this script

    Code:
    #!/bin/sh
    #
    # macsat RRDTool script for ASUS WL-500g (Deluxe) v1.1 (18-07-2005)
    #
    # (c) 2005 by macsat@macsat.com
    # Feel free to distribute and improve :-)
    #
    #
    
    # Configuration Start 
    
    # Directory for storing RRD Databases
    RRDDATA=/opt/var/lib/rrd/
    
    # Directory for storing webpages / images
    RRDIMG=/opt/share/www/rrd/
    
    
    # Configuration End
    
    #Output date for log...
    date
    
    if [ ! -d "${RRDDATA}" ]
    	then
    		echo "RRD Database dir: $RRDDATA does not exist...Creating Now...."
    		mkdir -p "${RRDDATA}"
    fi
    
    if [ ! -d "${RRDIMG}" ]
    	then
    		echo "RRD Image / web dir: $RRDIMG does not exist....Creating Now...."
    		mkdir -p "${RRDIMG}"
    fi
    
    
    # $1 = html file $2 = Period
    CreateHTML () 
    {
    echo "<HTML><HEAD><TITLE>macsat.com demo RRDTool Traffic Graph Page </TITLE></HEAD><BODY> <h3>Traffic Graphs - ${2} </h3>" > "${1}"
    echo "<center><a href='index.html'>Daily Graphs</a> | <a href='week.html'> Weekly Graphs </a> | <a href='month.html'> Monthly Graphs </a> | <a href='year.html'> Yearly Graph </a>" >> "${1}"
    echo "<br><br><img src='wan${2}.png'><br><img src='lan${2}.png'><br><img src='wlan${2}.png'><br></CENTER></BODY></HTML>" >> "${1}"
    
    echo "Create started..."
    
    }
    
    
    if [ ! -f "${RRDIMG}/index.html" ]
            then
                    echo " index.html does not exist.....Creating Now...."
    		CreateHTML "${RRDIMG}/index.html" day
    fi
    
    
    if [ ! -f "${RRDIMG}/week.html" ]
            then
                    echo " week.html does not exist.....Creating Now...."
    		CreateHTML "${RRDIMG}/week.html" week
    fi
    
    if [ ! -f "${RRDIMG}/month.html" ]
            then
                    echo " month.html does not exist.....Creating Now...."
    		CreateHTML "${RRDIMG}/month.html" month
    fi
    
    if [ ! -f "${RRDIMG}/year.html" ]
            then
                    echo " year.html does not exist.....Creating Now...."
    		CreateHTML "${RRDIMG}/year.html" year
    fi
    
    
    
    
    WANIF=`nvram get wan_ifname`
    LANIF=`nvram get lan_ifnames | awk '{print $1}'`
    WLANIF=`nvram get wl0_ifname`
    
    
    #debug lines
    echo "WAN Interface: ${WANIF}"
    echo "LAN Interface: ${LANIF}"
    echo "WLAN Interface: ${WLANIF}"
    
    
    WANRRD="${RRDDATA}/${WANIF}.rrd"
    LANRRD="${RRDDATA}/${LANIF}.rrd"
    WLANRRD="${RRDDATA}/${WLANIF}.rrd"
    
    
    CreateRRD ()
    {	
    	rrdtool create "${1}" \
    	DS:in:DERIVE:600:0:12500000 \
    	DS:out:DERIVE:600:0:12500000 \
    	RRA:AVERAGE:0.5:1:576 \
    	RRA:AVERAGE:0.5:6:672 \
    	RRA:AVERAGE:0.5:24:732 \
    	RRA:AVERAGE:0.5:144:1460
    }
    
    
    if [ ! -f "${WANRRD}" ]
    	then
    		echo "RRD file : ${WANRRD} does not exist...Creating Now..."
    		CreateRRD "${WANRRD}"
    fi
    
    if [ ! -f "${LANRRD}" ]
            then
                    echo "RRD file : ${LANRRD} does not exist...Creating Now..."
    		CreateRRD "${LANRRD}"
    fi
    
    if [ ! -f "${WLANRRD}" ]
            then
                    echo "RRD file : ${WLANRRD} does not exist...Creating Now..."
    		CreateRRD "${WLANRRD}"
    fi
    
    WANIN=`ifconfig "${WANIF}" |grep bytes|awk -F ":" '{print $2}'|awk '{print $1}'`
    WANOUT=`ifconfig "${WANIF}" |grep bytes|awk -F ":" '{print $3}'|awk '{print $1}'`
    LANIN=`ifconfig "${LANIF}" |grep bytes|awk -F ":" '{print $2}'|awk '{print $1}'`
    LANOUT=`ifconfig "${LANIF}" |grep bytes|awk -F ":" '{print $3}'|awk '{print $1}'`
    WLANIN=`ifconfig "${WLANIF}" |grep bytes|awk -F ":" '{print $2}'|awk '{print $1}'`
    WLANOUT=`ifconfig "${WLANIF}" |grep bytes|awk -F ":" '{print $3}'|awk '{print $1}'`
    
    # Debug
    echo "WAN -> in: ${WANIN}   out: ${WANOUT} "
    echo "LAN -> in: ${LANIN}   out: ${LANOUT}"
    echo "WLAN -> in: ${WLANIN}   out: ${WLANOUT}"
    
    # Update the Databases
    `rrdupdate "${WANRRD}" -t in:out N:"${WANIN}":"${WANOUT}"`
    `rrdupdate "${LANRRD}" -t in:out N:"${LANIN}":"${LANOUT}"`
    `rrdupdate "${WLANRRD}" -t in:out N:"${WLANIN}":"${WLANOUT}"`
    
    # $1 = ImageFile , $2 = Time in secs to go back , $3 = RRDfil , $4 = GraphText 
    CreateGraph ()
    {
      rrdtool graph "${1}.new" -a PNG -s -"${2}" -w 550 -h 240 -v "bytes/s" \
      'DEF:ds1='${3}':in:AVERAGE' \
      'DEF:ds2='${3}':out:AVERAGE' \
      'LINE1:ds1#00FF00:Incoming Traffic' \
      GPRINT:ds1:MAX:"Max %6.2lf %s" \
      GPRINT:ds1:MIN:"Min %6.2lf %s" \
      GPRINT:ds1:AVERAGE:"Avg %6.2lf %s" \
      GPRINT:ds1:LAST:"Curr %6.2lf %s\n" \
      'LINE1:ds2#0000FF:Outgoing Traffic' \
      GPRINT:ds2:MAX:"Max %6.2lf %s" \
      GPRINT:ds2:MIN:"Min %6.2lf %s" \
      GPRINT:ds2:AVERAGE:"Avg %6.2lf %s" \
      GPRINT:ds2:LAST:"Curr %6.2lf %s" \
      -t "${4}"
      mv -f "${1}.new" "${1}"
    }
    
    # Set time-variables
    MTIME=`date "+%M"`
    HTIME=`date "+%H"`
    
    # Update Daily graphs every 10 mins 
    if [ "${MTIME}" = 00 ] || [ "${MTIME}" = 10 ] || [ "${MTIME}" = 20 ] || [ "${MTIME}" = 30 ] || [ "${MTIME}" = 40 ] || [ "${MTIME}" = 50 ];
    then
    # 1 Day Graph
    echo "Daily Graphs created....."
    CreateGraph "${RRDIMG}/wanday.png" 86400 "${WANRRD}" WAN
    CreateGraph "${RRDIMG}/landay.png" 86400 "${LANRRD}" LAN
    CreateGraph "${RRDIMG}/wlanday.png" 86400 "${WLANRRD}" WLAN
    fi
    
    # Update Weekly graph once an hour
    if [ "${MTIME}" = 00 ];
    then
    # 1 Week Graph
    echo "Weekly Graphs created....."
    CreateGraph "${RRDIMG}/wanweek.png" 604800 "${WANRRD}" WAN
    CreateGraph "${RRDIMG}/lanweek.png" 604800 "${LANRRD}" LAN
    CreateGraph "${RRDIMG}/wlanweek.png" 604800 "${WLANRRD}" WLAN
    fi
    
    # Update  Monthly and Yearly graphs once a day (maby twice a day on 12h settings)
    if [ "${HTIME}" = 04 ] && [ "${MTIME}" = 15 ];
    then
    # 1 Month Graph
    echo "Monthly Graphs Created...."
    CreateGraph "${RRDIMG}/wanmonth.png" 2678400 "${WANRRD}" WAN
    CreateGraph "${RRDIMG}/lanmonth.png" 2678400 "${LANRRD}" LAN
    CreateGraph "${RRDIMG}/wlanmonth.png" 2678400 "${WLANRRD}" WLAN
    # 1 Year Graph
    echo "Yearly Graphs Created...."
    CreateGraph "${RRDIMG}/wanyear.png" 31536000 "${WANRRD}" WAN
    CreateGraph "${RRDIMG}/lanyear.png" 31536000 "${LANRRD}" LAN
    CreateGraph "${RRDIMG}/wlanyear.png" 31536000 "${WLANRRD}" WLAN
    fi
    
    
    echo " <------------------------------------------------------------->"
    echo " "



    The Directory for storage pics with schedules and for.rrd files this script has created.
    And all... In a broad gull a file rrdtool only such messages

    Sat Sep 6 10:07:53 UTC 2008
    RRD Database dir:/opt/var/lib/rrd/does not exist... Creating Now....
    RRD Image / web dir:/opt/share/www/rrd/does not exist.... Creating Now....
    syntax error
    Sat Sep 6 10:07:56 UTC 2008
    syntax error
    Sat Sep 6 10:07:58 UTC 2008
    syntax error
    Sat Sep 6 10:10:39 UTC 2008
    syntax error

    That was not pleasant to this script ?
    Help pls...
    Last edited by FastCat; 07-09-2008 at 21:15.

  15. #15

    Arrow

    The problem has started to dare gradually.
    To begin with, what a script (my first message) though see as that has started to work on wl-700g. Its first line should be changed to the
    Code:
    #!/opt/bin/sh
    Once again we try to start a script.
    Code:
    [root@WL700gE bin]$ ./rrdtool.sh
    Sun Sep  7 19:27:01 UTC 2008
    RRD Database dir: /opt/share/www/lighttpd/rrd/ does not exist...Creating Now....
     index.html does not exist.....Creating Now....
    Create started...
     week.html does not exist.....Creating Now....
    Create started...
     month.html does not exist.....Creating Now....
    Create started...
     year.html does not exist.....Creating Now....
    Create started...
    WAN Interface: eth0
    LAN Interface: vlan0
    WLAN Interface: eth1
    RRD file : /opt/share/www/lighttpd/rrd/eth0.rrd does not exist...Creating Now...
    Directory rrd it has created and.html files too has created. And here.rrd and pictures he does not wish to create files. A script it is necessary to "hang" (while it violently not to interrupt) with the message which "fat" is allocated (in broad gulls rrdtool anything is not present).

    That is interesting. A kind command:
    Code:
    rrdtool create load.rrd DS:sysload:GAUGE:600:U:U RRA:AVERAGE:0.5:1:48
    it is carried out perfectly. rrd the file is created.

    From here it is possible to draw a conclusion that with program adjustment of mine wl-700g all is good. And a problem in the script.

    Help pls to adapt the given script under wl-700g

Similar Threads

  1. RRDTool Traffic Graph Tutorial - Extremely easy to follow !
    By macsat in forum WL-500gP Tutorials
    Replies: 83
    Last Post: 09-06-2009, 21:34

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •