LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-05-2008, 05:18 AM   #1
redzi
LQ Newbie
 
Registered: Sep 2008
Posts: 1

Rep: Reputation: 0
rrd


Hi,

I have a problem with my rrd. In /usr/local/www/data/cable/rrd/ I have created rrd's

db10-C.rrd db10.rrd db9-C.rrd db9.rrd db8-C.rrd db8.rrd

In /usr/local/www/data/cable/rrdimages/ I have

db10-C-day.png db10-day.png db9-C-day.png db9-day.png db8-C-day.png db8-day.png

I need to get graphs for one hour, trhree hours, six hours, for week, month and year, but I can not do that.

Olso in /usr/local/www/data-dist/cable/inc/ I have two php files graph.php and graphc.php

graph.php

<?
// Function for graphing

function graph($time, $node) {


include ("inc/colors.php");
include ("inc/time.inc");

$rrdgraph = "/usr/local/bin/rrdtool graph /usr/local/www/data/cable/rrdimages/".$node."-".$time.".png \
--step 60 \
--slope-mode \
--interlaced \
--start " . $backtime . " \
--vertical-label 'Power (dBmV)' \
--width '670' \
--height '220' \
--title 'Statistics for " . $node . "' \
'DEF:A=/usr/local/www/data/cable/rrd/" . $node . ".rrd:max:AVERAGE' \
'DEF:B=/usr/local/www/data/cable/rrd/" . $node . ".rrd:min:AVERAGE' \
'CDEF:down=A' \
'CDEF:up=B' \
'COMMENT:\\n' \
'AREA:down".$dcol.":Power' \
'LINE1:down".$dlcol.":' \
'GPRINT:down:LAST:Last=%6.2lf%s' \
'GPRINT:down:MIN:Min=%6.2lf%s' \
'GPRINT:down:AVERAGE:Average=%6.2lf%s' \
'GPRINT:down:MAX:Max=%6.2lf%s' \
'COMMENT:\\n' \
'LINE1:up".$ucol.":' \
'COMMENT:\\n' \
'COMMENT: " . $grdate . "\\r'";

echo $rrdgraph . "<br>";
exec ($rrdgraph) or die("<br><b><font size='2'>No RRD<p>");

// echo "<fieldset><div align='center'><font face='Verdana' size='2'>" . $node . "-" . $time . "</fieldset>";
echo "<IMG SRC='rrdimages/" . $node . "-" . $time . ".png' alt=" . $node . ">";

......

?>


graphc.php


<?
// Function for graphing

function graphc($time, $node) {


include ("inc/colors.php");
include ("inc/time.inc");

$rrdgraph = "/usr/local/bin/rrdtool graph /usr/local/www/data/cable/rrdimages/".$node."-C-".$time.".png \
--step 60 \
--slope-mode \
--interlaced \
--start " . $backtime . " \
--vertical-label 'Power (dB)' \
--width '670' \
--height '220' \
--title 'Statistics for " . $node . "' \
'DEF:A=/usr/local/www/data/cable/rrd/" . $node . "-C.rrd:u1:AVERAGE' \
'DEF:B=/usr/local/www/data/cable/rrd/" . $node . "-C.rrd:u2:AVERAGE' \
'DEF:C=/usr/local/www/data/cable/rrd/" . $node . "-C.rrd:u3:AVERAGE' \
'DEF=/usr/local/www/data/cable/rrd/" . $node . "-C.rrd:u4:AVERAGE' \
'DEF:E=/usr/local/www/data/cable/rrd/" . $node . "-C.rrd:u5:AVERAGE' \
'DEF:F=/usr/local/www/data/cable/rrd/" . $node . "-C.rrd:u6:AVERAGE' \
'DEF:G=/usr/local/www/data/cable/rrd/" . $node . "-C.rrd:u7:AVERAGE' \
'DEF:H=/usr/local/www/data/cable/rrd/" . $node . "-C.rrd:u8:AVERAGE' \
'CDEF:u1=A' \
'CDEF:u2=B' \
'CDEF:u3=C' \
'CDEF:u4=D' \
'CDEF:u5=E' \
'CDEF:u6=F' \
'CDEF:u7=G' \
'CDEF:u8=H' \
'COMMENT:\\n' \

......


?>


How I can get graphs for different periods from one day ago.
 
Old 09-05-2008, 09:29 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,339

Rep: Reputation: 8091Reputation: 8091Reputation: 8091Reputation: 8091Reputation: 8091Reputation: 8091Reputation: 8091Reputation: 8091Reputation: 8091Reputation: 8091Reputation: 8091
Quote:
Originally Posted by redzi View Post
Hi,

I have a problem with my rrd. In /usr/local/www/data/cable/rrd/ I have created rrd's

db10-C.rrd db10.rrd db9-C.rrd db9.rrd db8-C.rrd db8.rrd

In /usr/local/www/data/cable/rrdimages/ I have

db10-C-day.png db10-day.png db9-C-day.png db9-day.png db8-C-day.png db8-day.png

I need to get graphs for one hour, trhree hours, six hours, for week, month and year, but I can not do that.

How I can get graphs for different periods from one day ago.
That would depend on how you created the graphs to start with, and the update periods you defined. RRDTOOL is fairly complex, have you gone through the manual and docs? What errors do you get when generating the graphs?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help on using rrd nawuza Linux - Newbie 1 08-28-2008 11:15 PM
RRD problem nawuza Linux - Newbie 1 07-30-2008 12:23 AM
ntop-rrd rajkumar_sanapal Linux - Networking 1 04-24-2006 03:35 PM
ntop-rrd rajkumar_sanapal Linux - Networking 1 04-24-2006 03:34 PM
rrd mrtg & mrtg-rrd.cgi ducati620 Linux - Newbie 0 06-03-2004 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration