Page 5 of 6 FirstFirst ... 3456 LastLast
Results 61 to 75 of 84

Thread: RRDTool Traffic Graph Tutorial - Extremely easy to follow !

  1. #61
    hello, the line
    Code:
    bash: ./rrdstorm.sh: /bin/bash: bad interpreter: No such file or directory
    says it all. Bash should not be installed in /bin. Are you sure you installed bash via ipkg? Because bash is an optional package and is not installed by default. Also if you want to properly display disk data you should install coreutils. Check this tutorial.
    Short said:

    Get rrdstorm.sh from http://wl500ginfo.pastebin.com/f789cf38a and edit ./rrdstorm.sh for proper grep functions in disk section
    Code:
    RRDuVAL[5]='
    SP=$(/opt/bin/coreutils-df "-B1")
    echo -n $(echo "$SP"|grep opt|awk "{print \$3\":\"\$2}"):
    echo -n $(echo "$SP"|grep mnt|awk "{print \$3\":\"\$2}")
    echo
    '
    mnt should be changed to whatever you use for mount.
    In shell
    Code:
    ipkg install coreutils
    ipkg install bash
    ipkg install cron
    bash rrdstorm.sh create 0 1 3 4 5 6
    Then edit crontab
    Code:
    vi /opt/ect/crontab
    with these values
    Code:
    */1 * * * * admin bash /path to/rrdstorm.sh update 0 1 3 4 5 6
    */22 * * * * admin bash /path to/rrdstorm.sh graph_cron s 0 1 3 4 5 6
    0 */1 * * * admin bash /path to/rrdstorm.sh graph_cron h 0 1 3 4 5 6
    3 */6 * * * admin bash /path to/rrdstorm.sh graph 0 1 3 4 5 6
    and chmod it
    Code:
    chmod 0600 /opt/ect/crontab
    and this is pretty much it. Good luck!
    Last edited by cupacup; 30-07-2008 at 00:46.

  2. #62
    Also get the latest version from here and check the demo graphs.

    Last edited by cupacup; 29-07-2008 at 17:48. Reason: demo graphs

  3. #63
    Join Date
    Jul 2008
    Location
    Romania, Bucharest
    Posts
    11
    Yeah, i noticed the version change when you uploaded the new file. I got both the old and the new one. I also noticed that i was stupid with the bash thingie, and edited the post above. Gonna try now what u posted. Thanks.
    WL-500gP V2 - Oleg Firmware

  4. #64
    Join Date
    Jul 2008
    Location
    Romania, Bucharest
    Posts
    11
    Ok, this is what i did:

    Changed:


    Code:
     
    SP=$(/opt/bin/coreutils-df "-B1")
    echo -n $(echo "$SP"|grep opt|awk "{print \$3\":\"\$2}"):
    echo -n $(echo "$SP"|grep mnt|awk "{print \$3\":\"\$2}")
    echo
    '
    RRDgUM[5]='space (bytes)'
    RRDgLIST[5]="30 31 32 33 34 35"
    RRDgDEF[5]=$(cat <<EOF
    'DEF:optzasede=\$RRD:optzasede:AVERAGE'
    'DEF:optprosto=\$RRD:optprosto:AVERAGE'
    'DEF:mntzasede=\$RRD:mntzasede:AVERAGE'
    'DEF:mntprosto=\$RRD:mntprosto:AVERAGE'
    'CDEF:bo=mntzasede,UN,0,mntzasede,IF,0,GT,UNKN,INF,IF'
    'AREA:bo#DDDDDD:'
    'AREA:mntzasede#CC0033:/mnt:'
      'CDEF:root=mntzasede,mntprosto,+'
      'VDEF:sumr=root,LAST'
    with

    Code:
    SP=$(df)
    echo -n $(echo "$SP"|grep opt|awk "{print \$3\":\"\$2}"):
    echo -n $(echo "$SP"|grep tmp|awk "{print \$3\":\"\$2}")
    echo
    '
    RRDgUM[5]='space (bytes)'
    RRDgLIST[5]="30 31 32 33 34 35"
    RRDgDEF[5]=$(cat <<EOF
    'DEF:optzasede=\$RRD:optzasede:AVERAGE'
    'DEF:optprosto=\$RRD:optprosto:AVERAGE'
    'DEF:mntzasede=\$RRD:mntzasede:AVERAGE'
    'DEF:mntprosto=\$RRD:mntprosto:AVERAGE'
    'CDEF:bo=mntzasede,UN,0,mntzasede,IF,0,GT,UNKN,INF,IF'
    'AREA:bo#DDDDDD:'
    'AREA:mntzasede#CC0033:/tmp/mnt/disc0_3:'
      'CDEF:root=mntzasede,mntprosto,+'
      'VDEF:sumr=root,LAST'
    I don`t know if that is good. I have like, 1 partition mounted to /opt and the other to /tmp/mnt/disc0_3 since I head oleg`s firmware doesn`t mount it anywhere else.

    Don`t know how correct that edit is.

    And another thing, the script seems to run successfully, but it doesn`t generate any output. The RRDDATA and RRDOUTPUT folders are empty after script execution.

    I think it crashes silently or something.

    I am already running rrdtools for traffic if it makes a difference.

    -- BTW, awesome demo.
    WL-500gP V2 - Oleg Firmware

  5. #65
    This is how it should look like.
    Code:
    SP=$(/opt/bin/coreutils-df "-B1")
    echo -n $(echo "$SP"|grep opt|awk "{print \$3\":\"\$2}"):
    echo -n $(echo "$SP"|grep disc0_3|awk "{print \$3\":\"\$2}")
    echo
    '
    RRDgUM[5]='space (bytes)'
    RRDgLIST[5]="30 31 32 33 34 35"
    RRDgDEF[5]=$(cat <<EOF
    'DEF:optzasede=\$RRD:optzasede:AVERAGE'
    'DEF:optprosto=\$RRD:optprosto:AVERAGE'
    'DEF:mntzasede=\$RRD:mntzasede:AVERAGE'
    'DEF:mntprosto=\$RRD:mntprosto:AVERAGE'
    'CDEF:bo=mntzasede,UN,0,mntzasede,IF,0,GT,UNKN,INF,IF'
    'AREA:bo#DDDDDD:'
    'AREA:mntzasede#CC0033:disc0_3:'
      'CDEF:root=mntzasede,mntprosto,+'
      'VDEF:sumr=root,LAST'
    You can check if rrd database is beeing updated with rrd with this:
    Code:
    [admin@dz0ny root]$ rrdtool lastupdate /path to/hdd.rrd 
     optprosto optzasede mntprosto mntzasede
    
    1217337065: 264934400 226105344 73048051712 79097274368
    Last edited by cupacup; 30-07-2008 at 00:46. Reason: URL

  6. #66
    Join Date
    Jul 2008
    Location
    Romania, Bucharest
    Posts
    11
    Thanks for the quick answer. I re-downloaded the file, and made the following modifications

    Code:
    #!/opt/bin/bash
    instead of

    Code:
    #!/bin/bash
    the modification u pasted now, with disc0_3, and

    Code:
     
    RRDTOOL=/opt/bin/rrdtool
    RRDUPDATE=/opt/bin/rrdupdate
    RRDDATA=/opt/var/lib/rrd
    RRDOUTPUT=/opt/wwwroot/rrd/hdd
    FORCEGRAPH=no
    to reflect the settings i`m using.

    This is what it shows when i run it

    Code:
    [xxx@xxx bin]$ ./rrdstorm.sh
    [xxx@xxx bin]$ ls /opt/var/lib/rrd/
    total 188
    drwxr-xr-x 2 xxx root  4096 Jul 29 13:09 .
    drwxr-xr-x 4 xxx root  4096 Jul 29 13:09 ..
    -rw-r--r-- 1 xxx root 56736 Jul 29 16:17 eth1.rrd
    -rw-r--r-- 1 xxx root 56736 Jul 29 16:17 vlan0.rrd
    -rw-r--r-- 1 xxx root 56736 Jul 29 16:17 vlan1.rrd
    [xxx@xxx bin]$ ls /opt/wwwroot/rrd/hdd
    total 8
    drwxr-xr-x 2 tbone root 4096 Jul 29 15:11 .
    drwxr-xr-x 3 tbone root 4096 Jul 29 16:15 ..
    It runs with no visible errors, but it kinda` doesn`t do anything.

    Any idea ?
    WL-500gP V2 - Oleg Firmware

  7. #67
    Hello, yes because it should not. try
    Code:
    .rrdstorm.sh create 0 1 3 4 5 6
    this one is for initial creating of databases an htmlfiles
    Code:
    .rrdstorm.sh update 0 1 3 4 5 6
    this one is for updating values
    Code:
    .rrdstorm.sh graph 0 1 3 4 5 6
    this one is for generating graphs
    Code:
    .rrdstorm.sh graph_cron s 0 1 3 4 5 6
    and this one is for quick updates

    I hope it works for you.
    Last edited by cupacup; 29-07-2008 at 15:47.

  8. #68
    Join Date
    Jul 2008
    Location
    Romania, Bucharest
    Posts
    11
    Yup, worked. Nifty looking graphs

    Thanks for everything mate.
    WL-500gP V2 - Oleg Firmware

  9. #69
    Quote Originally Posted by lordbone View Post
    Yup, worked. Nifty looking graphs

    Thanks for everything mate.
    No problems, I am glad you like it.

  10. #70
    Join Date
    Mar 2008
    Location
    Next to Serpent ..
    Posts
    62
    Still no run here.
    When i execute i get :

    ./rrdstorm.sh : line 594 : syntax error near unexpected token `) '
    ./rrdstorm.sh : line 594 : ` help)'

    Between ` and help in line 2 is some spaces, but forum deleted them.
    In cron modifications is done and modifications of script is the disk0_3 on right section and right paths for files.
    Maybe my copy/paste skills is outdated
    Try with different editors and browsers on win/router but same result.
    Lordbone you can upload the file here ?
    Last edited by poiu; 29-07-2008 at 19:57.

  11. #71
    Join Date
    Jul 2008
    Location
    Romania, Bucharest
    Posts
    11
    Yup, here u go mate:

    You can get it from here

    Good luck with it
    WL-500gP V2 - Oleg Firmware

  12. #72
    Join Date
    Mar 2008
    Location
    Next to Serpent ..
    Posts
    62
    Thank you lordbone, your file work ok, maybe the script get tainted on source ...
    Still prezentation is bad, need enter by hand cpu/hdd/ etc, the index is build empty, overall graphics is nice

  13. #73
    Quote Originally Posted by poiu View Post
    Still no run here.
    When i execute i get :

    ./rrdstorm.sh : line 594 : syntax error near unexpected token `) '
    ./rrdstorm.sh : line 594 : ` help)'

    Between ` and help in line 2 is some spaces, but forum deleted them.
    In cron modifications is done and modifications of script is the disk0_3 on right section and right paths for files.
    Maybe my copy/paste skills is outdated
    Try with different editors and browsers on win/router but same result.
    Lordbone you can upload the file here ?
    Well my copy>paste skills were bad not yours, sorry for that!

  14. #74
    Join Date
    Mar 2008
    Location
    Next to Serpent ..
    Posts
    62
    No harm done, copacup, we all tanks you for sharing your work with us ^^ .
    But a beauty will be if the graphics are build in main page, not spread.
    This is html work i think, but not any skills here, again..
    Overall charge on processor power is around 20% so i will live with, hope the Asus will too,, the another scripts find it around charge like 50% so was innaceptable, so i will let your script work.
    Another thing, wlan is blank, because of interface diferences between v1 and v2 ?
    And to kill cpu temp because wont work anyway what is needit ?

    LE: Y want to kill memory alocation/load/cpu temp to save power, i wont need it, is a quick way to do it besides try to comment some portions of script ?
    The 1,2,3,4,5,6, way will do ?
    Last edited by poiu; 30-07-2008 at 22:31.

  15. #75
    Yes you could do it or simply delete all html files and issue command
    Code:
    rrdstorm.sh create 4 5 6
    . Little explanation 0 is LOAD, 1 is MEMORY, 2 nothing yet, 3 CPU, WAN 4, DISK 5 and 6 WLAN.
    So if you want to create, for example just stats for disk, you would issue command rrdstorm create 5, values would get updated by rrdstorm update 5 and so on.
    LE: If you want just some graphs on main page, you can edit index html. And place those images there.
    Last edited by cupacup; 31-07-2008 at 01:04.

Page 5 of 6 FirstFirst ... 3456 LastLast

Similar Threads

  1. Tutorial, hoe bekijk ik mijn webcam vanaf het internet
    By carl in forum Dutch Discussion - Nederlands
    Replies: 9
    Last Post: 29-06-2009, 16:37
  2. samba and oleg tutorial
    By ddieter in forum WL-500g Q&A
    Replies: 4
    Last Post: 15-02-2008, 14:08
  3. Easy-to use cron-system.
    By macsat in forum WL-500g/WL-500gx Tutorials
    Replies: 3
    Last Post: 29-05-2007, 22:18
  4. Replies: 0
    Last Post: 17-09-2005, 19:34
  5. How can I log the traffic ?
    By exilist in forum WL-500g Q&A
    Replies: 3
    Last Post: 06-06-2004, 10:31

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
  •