[rrd-users] Re: Local time zone

Chitman Kaur chitmankaur at yahoo.com
Fri Nov 21 14:55:08 MET 2003


Hi
I have modified your file and its working now.... Sorry... it might not be the professional way of doing it but it works......
-----------------------------------------------------------------------------------------------------------
#!/usr/bin/perl
use RRDs;
print "Content-type: text/html\r\n\r\n";
$ENV{'TZ'} = "GMT";
print<<web;
<HTML>
<HEAD>
<title>STATISTIC</title>
<meta name="Description" content="">
<meta name="Keywords" content="">
<meta http-equiv="Refresh" content="60;  URL=pasmo.cgi">
</HEAD>
<BODY bgcolor="#084294">
<CENTER>
<P>
web
@args=(
          "/tmp/a.png",
         "DEF:A=/usr/local/arts/rrds/router_M_ROUTER/protocol_tcp.rrd:out_bytes:AVERAGE",
         "DEF:B=/usr/local/arts/rrds/router_MUM_ROUTER/protocol_tcp.rrd:in_bytes:AVERAGE",
          "CDEF:AA=A,8,*,1,*",
          "CDEF:AB=B,8,*,-1,*",
          "AREA:AA#0000FF:'OUT'",
          "AREA:AB#008F00:'IN'"
);
#       print header( -type => "image/png", -expires => 'now' );
#       RRDs::graph( '-', @args);
        RRDs::graph(@args);
         $err1 = RRDs::error;
        print $err1;
print<<web;
<IMG SRC=/tmp/a.png>
web
-----------------------------------------------------------------------------------------------------------
Let me know if you have any problems...
Regards
Chitman
Robert Heber <rheber at nawias.pl> wrote:
Hi,

this file I've renamed to graphs/Makefile.
I put there $ENV{'TZ'} = "GMT"; and generated
a new bunch of graphs, but they looks the same.

> as far as I know changing to GMT or to any
> other timing should happen when we read the RRD to
> create the graph ?.not when we put data into it.....

Hmmm... I was convinced that data (time values) in RRD file
are already wrong, and the graphs are generated straight from
it. All the mess is because of time change to the winter one
(we back the timers in last sunday of october). I've checked
timestamps in flow exporters (routers) - there time is good
(I mean the same as local because of ntp), then I've checked
time in flow-tools files and there time is also good. There
data is splited to the flowscan and sql database (good times).
At the end of flowscan process are graphs and there time is
wrong, but I do not exactly know what is in his rrdfiles -
I've blamed flowscan to compute time to non-local TZ.
To check rrdfiles I've composed this cgi script, but its
output (online generated sample graph) has also wrong time:

#!/usr/local/rrdtool-1.0.42/bin/rrdcgi












--imginfo ''
--title="Bandwidth in/out (last hour)"
--width '640'
--height '180'
--start -4h
-g
DEF:A=/usr/local/arts/flow6/graphs/my_data_file.rrd:out_bytes:AVERAGE
DEF:B=/usr/local/arts/flow6/graphs/my_data_file.rrd:in_bytes:AVERAGE
CDEF:AA=A,8,*,1,*
CDEF:AB=B,8,*,-1,*
AREA:AA#0000FF:"OUT"
AREA:AB#008F00:"IN">



So I'm stuck, I do not know what else should I change to correct TZ.
Or maybe this is a simple error from myself... BTW, do you know how
to apply $ENV{'TZ'} = "GMT"; in this cgi script ?

Robert

U¿ytkownik Chitman Kaur napisa³:

> Hi
> I am also using flowscan with JKFlow...
> In the JKGrapher.pl... if we put $ENV{'TZ'} = "GMT"; in the beginning 
> of the script then the timings of the graph comes in GMT....
> Since you are using CampusIO then you need to search which file makes 
> the graphs.... I think its graph.mf (I am not sure)... so put this
> line in the beginning of graph.mf (if that?s the file) ....
> You don't need to put it in pm files.... as far as I know changing to 
> GMT or to any other timing should happen when we read the RRD to
> create the graph ?.not when we put data into it.....
> Chitman


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi


---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list