X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=doc%2Frrdcreate.html;h=52b82c129fd7173f8339a7e3386b094ce3d4a15b;hb=8892808f3a79ec485e273390213ef3f16792eb54;hp=1ebf6e0fbd412f269ead6b24a1422bb839422edc;hpb=ba531669d795b10244c358135249016c5898519b;p=pkg-rrdtool.git diff --git a/doc/rrdcreate.html b/doc/rrdcreate.html index 1ebf6e0..52b82c1 100644 --- a/doc/rrdcreate.html +++ b/doc/rrdcreate.html @@ -50,74 +50,55 @@ Database (RRD) files. The file is created at its final, full size and filled with *UNKNOWN* data.

-
filename +
filename

The name of the RRD you want to create. RRD files should end with the extension .rrd. However, RRDtool will accept any filename.

- -
--start|-b start time (default: now - 10s) +
--start|-b start time (default: now - 10s)

Specifies the time in seconds since 1970-01-01 UTC when the first value should be added to the RRD. RRDtool will not accept any data timed before or at the time specified.

-
-

See also AT-STYLE TIME SPECIFICATION section in the rrdfetch documentation for other ways to specify time.

- -
--step|-s step (default: 300 seconds) +
--step|-s step (default: 300 seconds)

Specifies the base interval in seconds with which data will be fed into the RRD.

- -
DS:ds-name:DST:dst arguments +
DS:ds-name:DST:dst arguments

A single RRD can accept input from several data sources (DS), for example incoming and outgoing traffic on a specific communication line. With the DS configuration option you must define some basic properties of each data source you want to store in the RRD.

-
-

ds-name is the name you will use to reference this particular data source from an RRD. A ds-name must be 1 to 19 characters long in the characters [a-zA-Z0-9_].

-
-

DST defines the Data Source Type. The remaining arguments of a data source entry depend on the data source type. For GAUGE, COUNTER, DERIVE, and ABSOLUTE the format for a data source entry is:

-
-

DS:ds-name:GAUGE | COUNTER | DERIVE | ABSOLUTE:heartbeat:min:max

-
-

For COMPUTE data sources, the format is:

-
-

DS:ds-name:COMPUTE:rpn-expression

-
-

In order to decide which data source type to use, review the definitions that follow. Also consult the section on ``HOW TO MEASURE'' for further insight.

-
-
GAUGE +
GAUGE

is for things like temperatures or number of people in a room or the value of a RedHat share.

- -
COUNTER +
COUNTER

is for continuous incrementing counters like the ifInOctets counter in @@ -128,8 +109,7 @@ rate. When the counter overflows, RRDtool checks if the overflow happened at the 32bit or 64bit border and acts accordingly by adding an appropriate value to the result.

- -
DERIVE +
DERIVE

will store the derivative of the line going from the last to the @@ -138,22 +118,17 @@ example, to measure the rate of people entering or leaving a room. Internally, derive works exactly like COUNTER but without overflow checks. So if your counter does not reset at 32 or 64 bit you might want to use DERIVE and combine it with a MIN value of 0.

-
-
NOTE on COUNTER vs DERIVE +
NOTE on COUNTER vs DERIVE

by Don Baarda <don.baarda@baesystems.com>

-
-

If you cannot tolerate ever mistaking the occasional counter reset for a legitimate counter wrap, and would prefer ``Unknowns'' for all legitimate counter wraps and resets, always use DERIVE with min=0. Otherwise, using COUNTER with a suitable max will return correct values for all legitimate counter wraps, mark some counter resets as ``Unknown'', but can mistake some counter resets for a legitimate counter wrap.

-
-

For a 5 minute step and 32-bit counter, the probability of mistaking a counter reset for a legitimate wrap is arguably about 0.8% per 1Mbps of maximum bandwidth. Note that this equates to 80% for 100Mbps interfaces, so @@ -162,9 +137,9 @@ probably preferable. If you are using a 64bit counter, just about any max setting will eliminate the possibility of mistaking a reset for a counter wrap.

-
-
ABSOLUTE + +
ABSOLUTE

is for counters which get reset upon reading. This is used for fast counters @@ -173,8 +148,7 @@ after every read to make sure you have a maximum time available before the next overflow. Another usage is for things you count like number of messages since the last update.

- -
COMPUTE +
COMPUTE

is for storing the result of a formula applied to other data sources @@ -186,7 +160,6 @@ of the COMPUTE data source (that is the rpn-expression is only applied to generate PDPs). In database software, such data sets are referred to as ``virtual'' or ``computed'' columns.

-

heartbeat defines the maximum number of seconds that may pass between two updates of this data source before the value of the @@ -210,49 +183,41 @@ the RPN expression, the COMPUTE data source may only refer to the names of data source listed previously in the create command. This is similar to the restriction that CDEFs must refer only to DEFs and CDEFs previously defined in the same graph command.

-
RRA:CF:cf arguments + +
RRA:CF:cf arguments

The purpose of an RRD is to store data in the round robin archives (RRA). An archive consists of a number of data values or statistics for each of the defined data-sources (DS) and is defined with an RRA line.

-
-

When data is entered into an RRD, it is first fit into time slots of the length defined with the -s option, thus becoming a primary data point.

-
-

The data is also processed with the consolidation function (CF) of the archive. There are several consolidation functions that consolidate primary data points via an aggregate function: AVERAGE, MIN, MAX, LAST.

-
-
AVERAGE +
AVERAGE

the average of the data points is stored.

- -
MIN +
MIN

the smallest of the data points is stored.

- -
MAX +
MAX

the largest of the data points is stored.

- -
LAST +
LAST

the last data points is used.

-

Note that data aggregation inevitably leads to loss of precision and information. The trick is to pick the aggregate function such that the @@ -268,6 +233,7 @@ to the number of PDPs in the interval. Thus, it ranges from 0 to 1 (exclusive).<

steps defines how many of these primary data points are used to build a consolidated data point which then goes into the archive.

rows defines how many generations of data values are kept in an RRA.

+

@@ -489,7 +455,7 @@ same average rate. -- Don Baarda <HOW TO MEASURE

Here are a few hints on how to measure:

-
Temperature +
Temperature

Usually you have some type of meter you can read to get the temperature. @@ -498,8 +464,7 @@ that the temperature reading happened at a certain time. You can use the GAUGE data source type for this. RRDtool will then record your reading together with the time.

- -
Mail Messages +
Mail Messages

Assume you have a method to count the number of messages transported by @@ -513,8 +478,7 @@ from RRDtool for the day in question and multiply this number with the number of seconds in a day. Because all math is run with Doubles, the precision should be acceptable.

- -
It's always a Rate +
It's always a Rate

RRDtool stores rates in amount/second for COUNTER, DERIVE and ABSOLUTE @@ -529,7 +493,6 @@ that draws bar-plots, where the delta-time is clear on the plot for each point (such that when you read the graph you see for example GB on the y axis, days on the x axis and one bar for each day).

-