A question regarding step size in rrdxport ...

View: New views
6 Messages — Rating Filter:   Alert me  

A question regarding step size in rrdxport ...

by Andreas Maus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello everybody.
Perhaps someone out there can enlight me... :)

I am collecting some statistics from several cluster nodes
and store them in a rrd-database.

Each database holds 216000 samples of 5 min (don't ask ...
I really need this amount of data for such a long timespan ...).

To generate some reports I tried to call rrdxport with a step size
of 3600 sec. Running:

rrdtool xport --start=-1year --end now --step 3600 DEF:node01=node01/load.rrd:load1:AVERAGE XPORT:node01:loadonnode01

But I get the expcted XML output with a step of 78900 seconds although the database
is capable of handling this stepsize.

Does anybody know how I get the desired step size of 3600 seconds via
rrdxport?

Many thanks in advance ...

Andreas.

P.S.: Is there a reason that there is no RRDs::xport() in the perl module ?

--
Dipl.-Ing. Andreas Maus             science+computing ag
System Administration               Hagellocher Weg 71-75
mail: a.maus@...   72070 Tuebingen, Germany
tel.: +49 7071 9457 456             www.science-computing.de

-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: application/pgp-signature


--
Unsubscribe mailto:rrd-users-request@...?subject=unsubscribe
Help        mailto:rrd-users-request@...?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


Re: A question regarding step size in rrdxport ...

by Alex van den Bogaerdt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 06, 2005 at 04:31:55PM +0200, Andreas Maus wrote:

> To generate some reports I tried to call rrdxport with a step size
> of 3600 sec. Running:

If you desire specific step sizes, the first thing to make sure is
that you don't use "now" in start nor end, neither implicit or explicit.

> rrdtool xport --start=-1year --end now --step 3600 DEF:node01=node01/load.rrd:load1:AVERAGE XPORT:node01:loadonnode01

This contains an implicit "now", in "--start now-1year".

HTH
Alex

--
Unsubscribe mailto:rrd-users-request@...?subject=unsubscribe
Help        mailto:rrd-users-request@...?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


Re: A question regarding step size in rrdxport ...

by Wolfgang Schrimm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Andreas,

you have to give an appropriate maxrows parameter. The default is 400.

That's because xport uses logic from the graph command where the step
size is choosen based on the width of the graph.

With the default maxrows value and your start and end values you get:

365 x 24 x 3,600 = 31,536,000 (seconds)
31,536,000 / 400 = 78,840 (step size)
rounded to a multiple of 300 is 78900


PS: xport is available in the perl module (try the shared-demo.pl in the
examples directory)


hth,
Wolfgang


Andreas Maus wrote:

> Hello everybody.
> Perhaps someone out there can enlight me... :)
>
> I am collecting some statistics from several cluster nodes
> and store them in a rrd-database.
>
> Each database holds 216000 samples of 5 min (don't ask ...
> I really need this amount of data for such a long timespan ...).
>
> To generate some reports I tried to call rrdxport with a step size
> of 3600 sec. Running:
>
> rrdtool xport --start=-1year --end now --step 3600 DEF:node01=node01/load.rrd:load1:AVERAGE XPORT:node01:loadonnode01
>
> But I get the expcted XML output with a step of 78900 seconds although the database
> is capable of handling this stepsize.
>
> Does anybody know how I get the desired step size of 3600 seconds via
> rrdxport?
>
> Many thanks in advance ...
>
> Andreas.
>
> P.S.: Is there a reason that there is no RRDs::xport() in the perl module ?
>

--
Unsubscribe mailto:rrd-users-request@...?subject=unsubscribe
Help        mailto:rrd-users-request@...?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


Re: A question regarding step size in rrdxport ...

by Andreas Maus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 06, 2005 at 04:45:01PM +0200, Alex van den Bogaerdt wrote:
Hi Alex.
> > of 3600 sec. Running:
>
> If you desire specific step sizes, the first thing to make sure is
> that you don't use "now" in start nor end, neither implicit or explicit.
>
> > rrdtool xport --start=-1year --end now --step 3600 DEF:node01=node01/load.rrd:load1:AVERAGE XPORT:node01:loadonnode01
O.K. The final script will not use any references to 'now' (it will use UTC timestamps for
start end end).

> This contains an implicit "now", in "--start now-1year".
Unfortunately this doesn't work:

xrsc065@w0009022 strb01 > rrdtool xport --start=1089717833 --step=3600 --end=1121253833 DEF:load15b01=load.rrd:load15:AVERAGE XPORT:load15b01:load1
<?xml version="1.0" encoding="ISO-8859-1"?>

<xport>
  <meta>
    <start>1089766800</start>
    <step>78900</step>
    <end>1121326800</end>
    <rows>401</rows>
    <columns>1</columns>
    <legend>
      <entry>load1</entry>
    </legend>
  </meta>
  <data>
    <row><t>1089766800</t><v>NaN</v></row>
[... snipp ...]

The solution suggested by Wolfgang Schrimm on this list (using --maxrows) does the
trick. (but I didnt test it with a referenc to now).

Anyway thanks for your help.

Andreas.

--
Dipl.-Ing. Andreas Maus             science+computing ag
System Administration               Hagellocher Weg 71-75
mail: a.maus@...   72070 Tuebingen, Germany
tel.: +49 7071 9457 456             www.science-computing.de

-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: application/pgp-signature


--
Unsubscribe mailto:rrd-users-request@...?subject=unsubscribe
Help        mailto:rrd-users-request@...?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


Re: A question regarding step size in rrdxport ...

by Andreas Maus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 06, 2005 at 05:24:37PM +0200, Wolfgang Schrimm wrote:
Hi Wolfgang.

> Hello Andreas,
>
> you have to give an appropriate maxrows parameter. The default is 400.
>
> That's because xport uses logic from the graph command where the step
> size is choosen based on the width of the graph.
>
> With the default maxrows value and your start and end values you get:
>
> 365 x 24 x 3,600 = 31,536,000 (seconds)
> 31,536,000 / 400 = 78,840 (step size)
> rounded to a multiple of 300 is 78900
Your are right. Running rrdtool xport with --maxrows -which can be calculated
from a given start, stop and step- does the trick.

> PS: xport is available in the perl module (try the shared-demo.pl in the
> examples directory)
Ooops. Missed that I was only looking through man 3 RRDs and didn't found an
entry for RRDs::xport.

Thanks,

Andreas.

--
Dipl.-Ing. Andreas Maus             science+computing ag
System Administration               Hagellocher Weg 71-75
mail: a.maus@...   72070 Tuebingen, Germany
tel.: +49 7071 9457 456             www.science-computing.de

-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: application/pgp-signature


--
Unsubscribe mailto:rrd-users-request@...?subject=unsubscribe
Help        mailto:rrd-users-request@...?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


Time in CDEF

by Mitja Pufic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello all,

is it possible to use at style time spec in cdefs?

well i followed exakmple in cdef tutorial
./rrdtool graph speed3.png                             \
             --start 920804400 --end 920808000               \
             --vertical-label km/h                           \
             DEF:myspeed=test.rrd:speed:AVERAGE              \
             "CDEF:kmh=myspeed,3600,*"                       \
        CDEF:only=TIME,920804520,GE,TIME,920806020,LE,*,myspeed,UNKN,IF \
             HRULE:100#0000FF:"Maximum allowed"              \
             AREA:only#00FF00:"Test"

in this example I plot only from 11:02 to 11:27, but if I try to use
something other than seconds since epoch, I get nothing, I tryed with
11:02 and 11.02, the first example yields ERROR: invalid rpn expression
'TIME,11', the second creates png without error, but nothing is diplayed

thanks in advance and best regards,
mitja

--
Unsubscribe mailto:rrd-users-request@...?subject=unsubscribe
Help        mailto:rrd-users-request@...?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi