Page 2 of 6 FirstFirst 1234 ... LastLast
Results 16 to 30 of 76

Thread: Trouble with RRDTool and updated uClibc

  1. #16
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Does xwrt use 2.4.20 kernel?

  2. #17
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Xwrt is OpenWRT whiterussian and uses 2.4.30 kernel
    root@OpenWrt:/opt/share/torrent/work$ uname -a
    Linux OpenWrt 2.4.30 #1 Fri Nov 24 23:16:54 EST 2006 mips unknown

  3. #18
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    As said before I've compiled natively rrdtool and 1.0.50 work while 1.2.15 hangs.
    Now I've prepared cross-compiled version of the rrdtool 1.0.50 and realised that it does not work either. I've tried several options without a success

    I have also compared both configure logs And I cannot find the difference.
    See http://pastebin.ca/288738 or attached diff --side-by-side -d
    On the left is cross-compiled config.log | right native compile.
    Attached Files Attached Files
    Last edited by oleo; 22-12-2006 at 15:41.

  4. #19
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Later I've remembered that I was using gcc-4.1.1 native buildroot toolchain on rrdtool-1.0.50 and cross-compiling was gcc-3.4.6 . See line 325 on my prevous post.

    So I've tried also with gcc-4.1.1 cross toolchain and got positive result with several rrdtool create ...

    rrdtool-1.2.15 does not work native nor cross.

    Tried 4.1.1 cross compiling gnuplot-4.2.rc2 which hung on 3.4.6 on some plots. Compiled with 4.1.1 gnuplot works.

    It seems that this 4.1.1 is a way to go. I've tried wild compile of the whole Optware repository before and found some old sources fail to build though.

  5. #20
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Solved problem with rrdtool 1.2.5 by removing -std=gnu99 compiler option. Users should try to upgrade uclibc-opt package too.


    There is also rrdcollect package for collecting system statistics. I need some useful examples.
    Last edited by oleo; 31-12-2006 at 00:39. Reason: rrdcollect info

  6. #21
    Quote Originally Posted by oleo View Post
    Solved problem with rrdtool 1.2.5 by removing -std=gnu99 compiler option. Users should try to upgrade uclibc-opt package too.


    There is also rrdcollect package for collecting system statistics. I need some useful examples.
    Hi,
    yesterday I switch to "oleg/cross/stable" feed, I've installed the latest rrdtool and uclibc-opt. I have no problem with database creation nor update, the rrdtools hangs on graph creation. But only when the the rr database contains gaps or zero.

    I'm monitoring three interfaces: wan, lan and wlan. I don't use the wlan interface, it is disabled. So the database is filled by zeros and the graph was always "blank". Yesterday, after update to "oleg/cross/stable", the rddtool always hangs on creation of wlan graph. So I disabled wlan graph creation. Other two graphs were created without problems.

    But then I went sleep and I switch off my computer. So the lan interface was down and cron started to fill the rr database with zero values. And again, it causes hang of lan graph creation. So today morning was the router overloaded because of many "rrdtool graph" commands was still running

    I had to comment to the lan graph creation and I expected that one small gap or zero in wan database will cause hang of the wlan graph creation.

    Command for graph creation:
    Code:
    rrdtool graph /opt/share/www/rrd//landay.png.new -a PNG -s -86400 -w 550 -h 240 -v bytes/s DEF:ds1=/opt/var/lib/rrd//vlan0.rrd:in:AVERAGE DEF:ds2=/opt/var/lib/rrd//vlan0.rrd: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 LAN COMMENT:\n COMMENT:                                                         Vytvoreno\: 19.01.2007 07\:20\:18
    last lines in strace output
    Code:
    [maros@wl-500gp tmp]$ tail -n 30 strace.out
    _llseek(3, 18444, [18444], SEEK_SET)    = 0
    _llseek(3, 18444, [18444], SEEK_SET)    = 0
    read(3, "\0\3\0\205\377\343\4L\5\360\0\v\0\27\0#\1\n@\32\3\245\t"..., 92) = 92
    _llseek(3, 15212, [15212], SEEK_SET)    = 0
    _llseek(3, 18926, [18926], SEEK_SET)    = 0
    _llseek(3, 18926, [18926], SEEK_SET)    = 0
    read(3, "\0\3\0\205\377\343\4L\5\325\0\6\0005@\31\5%\2\3\2\3%\4"..., 66) = 66
    _llseek(3, 15212, [15212], SEEK_SET)    = 0
    _llseek(3, 17792, [17792], SEEK_SET)    = 0
    _llseek(3, 17792, [17792], SEEK_SET)    = 0
    read(3, "\274\210\325*\274\210\325*\273\0\0\0H\4/\2{\1\0\0\300\0"..., 190) = 190
    _llseek(3, 15212, [15212], SEEK_SET)    = 0
    _llseek(3, 18444, [18444], SEEK_SET)    = 0
    _llseek(3, 18444, [18444], SEEK_SET)    = 0
    read(3, "\200\1\0\0\0\0\0\0\5\325\0\6\0005@\31\5%\2\3\2\3%\4\0\0"..., 92) = 92
    _llseek(3, 15212, [15212], SEEK_SET)    = 0
    _llseek(3, 18926, [18926], SEEK_SET)    = 0
    _llseek(3, 18926, [18926], SEEK_SET)    = 0
    read(3, "\200\1\0\0\0\0\0\0\4\'\0\3\0\7\0\33@\r\2\242\0\254\4\242"..., 66) = 66
    _llseek(3, 15212, [15212], SEEK_SET)    = 0
    _llseek(3, 17530, [17530], SEEK_SET)    = 0
    _llseek(3, 17530, [17530], SEEK_SET)    = 0
    read(3, "\0\1\0\366\0\0\4F\5\325\0\n\0&@\24\0\0\0\0\0\0\0\0\0\0"..., 86) = 86
    _llseek(3, 15212, [15212], SEEK_SET)    = 0
    _llseek(3, 17530, [17530], SEEK_SET)    = 0
    _llseek(3, 17530, [17530], SEEK_SET)    = 0
    read(3, "\0\1\0\366\0\0\4F\5\325\0\n\0&@\24\3\227\4\2\227\5\210"..., 86) = 86
    close(3)                                = 0
    ************HANG HERE*********************
    --- SIGINT (Interrupt) @ 0 (0) ---
    +++ killed by SIGINT +++
    Attached Files Attached Files

  7. #22

    Bonus

    Bonus

    Nice graph shows growing load caused by graph creation process hangs.
    Attached Images Attached Images  

  8. #23
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    There are some kernel fpemu bugs in Oleg's 7f. Try 7g-pre1 available
    at http://wl500g.dyndns.org/7g

    This should solve your problems.

    I would also like to have your scripts to for creating graphs as samples to include with
    rrdtool. And rrdcollect scripts also.
    Last edited by oleo; 19-01-2007 at 08:32.

  9. #24
    Quote Originally Posted by oleo View Post
    There are some kernel fpemu bugs in Oleg's 7f. Try 7g-pre1 available
    at http://wl500g.dyndns.org/7g

    This should solve your problems.
    Thanks, it works now.

    The upgrade was a little bit complicated, first firmware flash failed and I spent two hours to fix it and I also lost my post-firewall script (Don't forget to backup your setting before flashing )

    Quote Originally Posted by oleo View Post
    I would also like to have your scripts to for creating graphs as samples to include with
    rrdtool. And rrdcollect scripts also.
    Sure. It is based on macsat rrdtool tutorial
    I added cpu load and memory usage graphs and archiving.

    Script is run each minute from cron. Graphs are in /opt/share/www/rrd/ directory.
    Attached Files Attached Files
    Last edited by maros; 21-01-2007 at 18:39. Reason: Misspelled

  10. #25
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    There are some architectural problems with this rrdtool.sh although I must admit it is nice to start with single script.

    Could you please restructure this script to use rrdcollect instead of using cron for update.
    • Running script every minute is not very wise think to do in when low CPU and mem is available
    • rrdcollect overcomes most of collect problems and acts as daemon without stressing the system for spawning and opening files for update.
    • creating daily graphs for archiving can be done by cron
    • for current graphs rrdcgi should be used on demand.
    • crontab file should be configurable so user can comment out unwanted graphs
    • system dependent thing could be in separate /opt/etc/stats.conf
    • database creation should be done by package postinst/prerm scripts


    If you are able to provide this I could include this in default rrdcollect package.

  11. #26
    OK,
    I can try, rrdcollect looks interesting. It will took some time.

  12. #27
    Join Date
    Jun 2005
    Location
    The Netherlands, Haarlem
    Posts
    33
    Quote Originally Posted by maros View Post
    Thanks, it works now.

    The upgrade was a little bit complicated, first firmware flash failed and I spent two hours to fix it and I also lost my post-firewall script (Don't forget to backup your setting before flashing )



    Sure. It is based on macsat rrdtool tutorial
    I added cpu load and memory usage graphs and archiving.

    Script is run each minute from cron. Graphs are in /opt/share/www/rrd/ directory.

    i have replaced the rrdtool.sh with the 1 you provided, but is there more wqhat i must done before i see the cpu/mem usage?

  13. #28
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Here are my minor changes to PATH in attached rrdtool.sh It runs from cron
    with /opt/etc/cron.d/macsat
    Code:
    #minute hour    mday    month   wday    who     command
    *     *       *       *       *       admin    /opt/bin/rrdtool.sh >>/opt/var/log/macsat.log
    But as I said I don't like it. It could serve as example, though.
    Attached Files Attached Files

  14. #29
    Join Date
    Jun 2005
    Location
    The Netherlands, Haarlem
    Posts
    33
    Quote Originally Posted by oleo View Post
    Here are my minor changes to PATH in attached rrdtool.sh It runs from cron
    with /opt/etc/cron.d/macsat
    Code:
    #minute hour    mday    month   wday    who     command
    *     *       *       *       *       admin    /opt/bin/rrdtool.sh >>/opt/var/log/macsat.log
    But as I said I don't like it. It could serve as example, though.

    1question the graph for mem/cpu is ok but the index.html only shows the 3 original graph wan/lan/wlan how can i add the other grapg mem/cpu?

  15. #30
    Quote Originally Posted by Devil-Strike View Post
    i have replaced the rrdtool.sh with the 1 you provided, but is there more wqhat i must done before i see the cpu/mem usage?
    Did you put it to crontab?
    Code:
    */1 * * * * admin nice /opt/bin/rrdtool.sh >> /opt/var/log/rrdtool.log 2>&1
    (Note: "admin" is default user, must be changed if you are using different user)

    Is there something interesting in log? (/opt/var/log/rrdtool.log)

    Or you can try to run the script with command:
    Code:
    sh -x /opt/bin/rrdtool.sh
    I'm working now on new, modular version, using rrdcollect program according to oleo comments. Maybe next week I will have first working version. Actually a module_cpuload is almost done and I need to made some nice cgi script and prepare other modules (memory, netload).

Page 2 of 6 FirstFirst 1234 ... LastLast

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
  •