0

I have an rrd file in which traffic_in and out stats of interfaces are stored.

What i want is that i want Max and min values in certain time period.

I'm trying this command but it is giving me error ERROR: invalid rpn expression in: v,MAX

rrdtool graph -s 1537466100 -e 1537552237 DEF:v=lhr-spndc-7609_traffic_in_612.rrd:traffic_in:MAX CDEF:vm=v,MAX PRINT:vm:%lf

Can you please help to enter correct command & achieving desired Functionality?

Terminator
  • 117
  • 7

1 Answers1

0

You should be using VDEF for the definition of vm, not CDEF.

A CDEF is for transforming one or more data series created by either a DEF or CDEF into another series, ready for graphing or summarising.

A VDEF is for transforming a single data series into a single value via a consolodation function, such as to get the maximum value of a series over the entire graph. This is different from the function specified in a DEF, which only specifies how to consolodate a higher-granularity series into a lower-granularity series.

Steve Shipway
  • 3,754
  • 3
  • 22
  • 39
  • Hello dear i have tried with VDEF as well. Can you tell me what is the solution then. – Terminator Sep 26 '18 at 09:40
  • DEF:v=file.rrd:ds:MAX VDEF:vm=v,MAXIMUM -- this gives you the single value for maximum of ds over the entire time window. Similarly with MIN/MINIMUM to get minimum values, provided you have the necessary RRAs in the file. – Steve Shipway Sep 27 '18 at 20:30
  • i'm getting this error Mr.Steve "ERROR: Not a valid vname: v in line VDEF:vm=v,MAXIMUM" – Terminator Sep 30 '18 at 15:28
  • This means you have not configured v correctly. Check the rest of your commandline and look for other errors. Make sure you define v before using it to define vm. – Steve Shipway Sep 30 '18 at 20:07