macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 10:05:52 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: CGI Based RRDTool solution  (Read 2442 times)
0 Members and 1 Guest are viewing this topic.
MMCM
Newbie
*
Offline Offline

Posts: 26


View Profile
« on: April 30, 2006, 23:24:21 PM »

Ok, here's my CGI solution :-)

Prerequisites:
- rrdtool package already installed (rrdtool.sh is only modified)
- thttpd without php because max. execution time >30 sec required (if you need php, you could run both versions on different ports)
- thttpd with cgi scripts enabled in /cgi-bin/*
- write access to directories containing *.png files for user running thttpd (usually nobody)

Download:
http://www.photo-photo.at/download/wl-500gx/rrdtool-cgi.tar.gz

See if the directory structure fits you needs.

Create CPU usage & CPU load database, if needed:
/opt/usr/bin/cpuusage.sh create
/opt/usr/bin/graphcpu.sh create

Add the following lines to your crontab (replace line with rrdtool.sh, or remove it from cron.5mins):
*/5 * * * * admin /opt/usr/bin/graphcpu.sh update; /opt/usr/bin/rrdtool.sh
*/3 * * * * admin /opt/usr/bin/cpuusage.sh update

View in browser:
http://yourrouter:port/rrd/index.html
http://yourrouter:port/cpu/cpu_usage.html
http://yourrouter:port/cpu/cpu_load.html

Generating graphs takes about 30 secs each, so be patient.

I hope, I didn't forget anything :-)

Maybe, I'll try iptables based statistics next ;-)

Oh, I forgot to mention, this is for Olegs firmware, so maybe it's in the wrong forum ;-)
Logged
erlis
Jr. Member
**
Offline Offline

Posts: 66


View Profile WWW
« Reply #1 on: June 12, 2006, 12:52:37 PM »

Nice, if you look at http://home.erlis.se i already have the CGI version for iptables working on my router (I'm running openWRT but it shuldn't be any diffrence).

Logged
MMCM
Newbie
*
Offline Offline

Posts: 26


View Profile
« Reply #2 on: June 21, 2006, 12:55:55 PM »

Your site is offline all the time :-(

Which version of rrdtool do you use on OpenWrt?
Did you read the following thread about problems with rrdtool on OpenWrt?
http://www.macsat.com/macsat/component/option,com_smf/Itemid,46/topic,316.0

best regards
Martin
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.144 seconds with 24 queries.