X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=doc%2Frrdfetch.html;h=392bdb2edb431805448115e5b1ca914184376931;hb=HEAD;hp=c8b21d3e661156e51eed130ceb4cd08d89b3d810;hpb=a93b6b71c84ffda2b82a8dc5e56e01940d5a5bbe;p=pkg-rrdtool.git diff --git a/doc/rrdfetch.html b/doc/rrdfetch.html index c8b21d3..392bdb2 100644 --- a/doc/rrdfetch.html +++ b/doc/rrdfetch.html @@ -1,14 +1,18 @@ + rrdfetch + -

+ +
+

+ + +

@@ -52,60 +60,53 @@ function to get data from RRDs. fetch will analyze the RRD and try to retrieve the data in the resolution requested. The data fetched is printed to stdout. *UNKNOWN* data is often -represented by the string ``NaN'' depending on your OS's printf +represented by the string "NaN" depending on your OS's printf function.

-
filename
-
+
filename
+
-the name of the RRD you want to fetch the data from. +

the name of the RRD you want to fetch the data from.

-

-
CF
-
+
CF
+
-the consolidation function that is applied to the data you -want to fetch (AVERAGE,MIN,MAX,LAST) +

the consolidation function that is applied to the data you +want to fetch (AVERAGE,MIN,MAX,LAST)

-

-
--resolution|-r resolution (default is the highest resolution)
-
+
--resolution|-r resolution (default is the highest resolution)
+
-the interval you want the values to have (seconds per +

the interval you want the values to have (seconds per value). rrdfetch will try to match your request, but it will return -data even if no absolute match is possible. NB. See note below. +data even if no absolute match is possible. NB. See note below.

-

-
--start|-s start (default end-1day)
-
+
--start|-s start (default end-1day)
+
-start of the time series. A time in seconds since epoch (1970-01-01) +

start of the time series. A time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time. By default, one day worth of data will be fetched. See also AT-STYLE TIME SPECIFICATION -section for a detailed explanation on ways to specify the start time. +section for a detailed explanation on ways to specify the start time.

-

-
--end|-e end (default now)
-
+
--end|-e end (default now)
+
-the end of the time series in seconds since epoch. See also AT-STYLE +

the end of the time series in seconds since epoch. See also AT-STYLE TIME SPECIFICATION section for a detailed explanation of how to -specify the end time. +specify the end time.

-

-
--daemon address
-
+
--daemon address
+
-Address of the the rrdcached manpage daemon. If specified, a flush command is sent +

Address of the the rrdcached manpage daemon. If specified, a flush command is sent to the server before reading the RRD files. This allows rrdtool to return fresh data even if the daemon is configured to cache values for a long time. -For a list of accepted formats, see the -l option in the the rrdcached manpage manual. -

-
+For a list of accepted formats, see the -l option in the the rrdcached manpage manual.

  rrdtool fetch --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd AVERAGE
-

+

RESOLUTION INTERVAL

@@ -133,13 +134,14 @@ i.e. 5 minute averages, will be chosen which in this case is not what you want.

Hence, make sure that

    -
  1. -both start and end time are a multiple of 900 -

    -
  2. -both start and end time are within the desired RRA -

-

So, if time now is called ``t'', do

+
  • +

    both start and end time are a multiple of 900

    +
  • +
  • +

    both start and end time are within the desired RRA

    +
  • + +

    So, if time now is called "t", do

      end time == int(t/900)*900,
      start time == end time - 1hour,
    @@ -157,10 +159,10 @@ both start and end time are within the desired RRA
                       -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"'

    -

    AT-STYLE TIME SPECIFICATION

    +

    AT-STYLE TIME SPECIFICATION

    Apart from the traditional Seconds since epoch, RRDtool does also understand at-style time specification. The specification is called -``at-style'' after the Unix command at(1) that has moderately complex +"at-style" after the Unix command at(1) that has moderately complex ways to specify time to run your job at a certain date and time. The at-style specification consists of two parts: the TIME REFERENCE specification and the TIME OFFSET specification.

    @@ -187,11 +189,16 @@ full date in several numerical formats, including MM/DD/[YY]YY, single-number date is interpreted as MMDD[YY]YY.

    NOTE2: if you specify the day in this way, the time-of-day is REQUIRED as well.

    -

    Finally, you can use the words now, start, or end as your time +

    Finally, you can use the words now, start, end or epoch as your time reference. Now refers to the current moment (and is also the default time reference). Start (end) can be used to specify a time relative to the start (end) time for those tools that use these -categories (rrdfetch, the rrdgraph manpage).

    +categories (rrdfetch, the rrdgraph manpage) and epoch indicates the +*IX epoch (*IX timestamp 0 = 1970-01-01 00:00:00 UTC). epoch is +useful to disambiguate between a timestamp value and some forms +of abbreviated date/time specifications, because it allows to use +time offset specifications using units, eg. epoch+19711205s unambiguously +denotes timestamp 19711205 and not 1971-12-05 00:00:00 UTC.

    Month and day of the week names can be used in their naturally abbreviated form (e.g., Dec for December, Sun for Sunday, etc.). The words now, start, end can be abbreviated as n, s, e.

    @@ -235,20 +242,21 @@ equals 47 hours; on the other hand, '8:00 Mar 27 1999 +48&nb is m. To disambiguate them, the parser tries to read your mind :) by applying the following two heuristics:

      -
    1. -If m is used in context of (i.e. right after the) years, +
    2. +

      If m is used in context of (i.e. right after the) years, months, weeks, or days it is assumed to mean months, while in the context of hours, minutes, and seconds it means minutes. (e.g., in -1y6m or +3w1m m is interpreted as months, while in --3h20m or +5s2m m the parser decides for minutes). -

      -
    3. -Out of context (i.e. right after the + or - sign) the +-3h20m or +5s2m m the parser decides for minutes).

      + +
    4. +

      Out of context (i.e. right after the + or - sign) the meaning of m is guessed from the number it directly follows. Currently, if the number's absolute value is below 25 it is assumed that m means months, otherwise it is treated as minutes. -(e.g., -25m == -25 minutes, while +24m == +24 months) -

    +(e.g., -25m == -25 minutes, while +24m == +24 months)

    + +

    Final NOTES: Time specification is case-insensitive. Whitespace can be inserted freely or omitted altogether. There are, however, cases when whitespace is required @@ -282,14 +290,14 @@ as 9am-1day.

    The following environment variables may be used to change the behavior of rrdtoolfetch:

    -
    RRDCACHED_ADDRESS
    -
    +
    RRDCACHED_ADDRESS
    +
    -If this environment variable is set it will have the same effect as specifying +

    If this environment variable is set it will have the same effect as specifying the --daemon option on the command line. If both are present, the command -line argument takes precedence. +line argument takes precedence.

    -

    +