1 RRDTOOL(1) rrdtool RRDTOOL(1)
6 rrdtool - Round Robin Database Tool
13 It is pretty easy to gather status information from all sorts of
14 things, ranging from the temperature in your office to the number of
15 octets which have passed through the FDDI interface of your router. But
16 it is not so trivial to store this data in an efficient and systematic
17 manner. This is where R\bRR\bRD\bDt\bto\boo\bol\bl comes in handy. It lets you _\bl_\bo_\bg _\ba_\bn_\bd
19 data analysis part of RRDtool is based on the ability to quickly
20 generate graphical representations of the data values collected over a
21 definable time period.
23 In this man page you will find general information on the design and
24 functionality of the Round Robin Database Tool (RRDtool). For a more
26 check the corresponding man page.
28 For an introduction to the usage of RRDtool make sure you consult the
29 rrdtutorial.
32 While the man pages talk of command line switches you have to set in
33 order to make R\bRR\bRD\bDt\bto\boo\bol\bl work it is important to note that R\bRR\bRD\bDt\bto\boo\bol\bl can be
34 remotely controlled through a set of pipes. This saves a considerable
36 quickly. Check the section on Remote_Control further down. There is
37 also a number of language bindings for RRDtool which allow you to use
38 it directly from Perl, python, Tcl, PHP, etc.
44 u\bup\bpd\bda\bat\bte\bev\bv Operationally equivalent to u\bup\bpd\bda\bat\bte\be except for output. Check
45 rrdupdate.
48 from generating graphs, data can also be extracted to stdout.
49 Check rrdgraph.
52 restore you can use this to move an RRD from one computer
53 architecture to another. Check rrddump.
58 function uses fetch to retrieve its data from an RRD. Check
59 rrdfetch.
68 Change the size of individual RRAs. This is dangerous! Check
69 rrdresize.
74 Check rrdcgi.
77 Data Acquisition
78 When monitoring the state of a system, it is convenient to have
79 the data available at a constant time interval. Unfortunately,
80 you may not always be able to fetch data at exactly the time
82 any time you want. It will automatically interpolate the value
84 (interval) and write this interpolated value to the log. The
85 original value you have supplied is stored as well and is also
86 taken into account when interpolating the next log entry.
88 Consolidation
89 You may log data at a 1 minute interval, but you might also be
90 interested to know the development of the data over the last
91 year. You could do this by simply storing the data in 1 minute
92 intervals for the whole year. While this would take
93 considerable disk space it would also take a lot of time to
94 analyze the data when you wanted to create a graph covering the
96 its data consolidation feature. When setting up an Round Robin
98 consolidation should occur, and what consolidation function
100 build the consolidated values (see rrdcreate). You can define
102 They will all be maintained on the fly when new data is loaded
105 Round Robin Archives
106 Data values of the same consolidation setup are stored into
108 store data for a certain amount of time, while using a known
109 and constant amount of storage space.
111 It works like this: If you want to store 1'000 values in 5
113 values and a header area. In the header it will store a pointer
114 telling which slots (value) in the storage area was last
115 written to. New values are written to the Round Robin Archive
116 in, you guessed it, a round robin manner. This automatically
117 limits the history to the last 1'000 values (in our example).
119 can setup another one, for storing 750 data values at a 2 hour
120 interval, for example, and thus keep a log for the last two
121 months at a lower resolution.
124 and that old data is automatically eliminated. By using the
125 consolidation feature, you can still keep data for a very long
126 time, while gradually reducing the resolution of the data along
127 the time axis.
130 store exactly the type of information that actually interests
131 you: the maximum one minute traffic on the LAN, the minimum
132 temperature of your wine cellar, the total minutes of down
133 time, etc.
135 Unknown Data
137 interval. Sometimes it may happen that no new data is available
142 functions of the tool. When consolidating a data set, the
144 consolidated value is ready to be written to its Round Robin
146 the percentage of unknown values in the data point is above a
150 Graphing
153 The graphing feature is fully configurable. Size, color and
154 contents of the graph can be defined freely. Check rrdgraph for
155 more information on this.
157 Aberrant Behavior Detection
158 by Jake Brutlag
161 aberrant behavior detection. These components include:
163 · An algorithm for predicting the value of a time series one
164 time step into the future.
166 · A measure of deviation between predicted and observed
167 values.
169 · A mechanism to decide if and when an observed value or
171 predicted value(s).
173 Here is a brief explanation of these components:
175 The Holt-Winters time series forecasting algorithm is an on-
176 line (or incremental) algorithm that adaptively predicts future
177 observations in a time series. Its forecast is the sum of three
178 components: a baseline (or intercept), a linear trend over time
179 (or slope), and a seasonal coefficient (a periodic effect, such
180 as a daily cycle). There is one seasonal coefficient for each
181 time point in the period (cycle). After a value is observed,
182 each of these components is updated via exponential smoothing.
183 This means that the algorithm "learns" from past values and
184 uses them to predict the future. The rate of adaptation is
185 governed by 3 parameters, alpha (intercept), beta (slope), and
186 gamma (seasonal). The prediction can also be viewed as a
187 smoothed value for the time series.
189 The measure of deviation is a seasonal weighted absolute
191 separately for each time point in the seasonal cycle. As with
192 Holt-Winters forecasting, deviation is predicted using the
193 measure computed from past values (but only at that point in
194 the seasonal cycle). After the value is observed, the algorithm
195 learns from the observed value via exponential smoothing.
196 Confidence bands for the observed time series are generated by
197 scaling the sequence of predicted deviation values (we usually
198 think of the sequence as a continuous line rather than a set of
199 discrete points).
201 Aberrant behavior (a potential failure) is reported whenever
202 the number of times the observed value violates the confidence
203 bands meets or exceeds a specified threshold within a specified
204 temporal window (e.g. 5 violations during the past 45 minutes
205 with a value observed every 5 minutes).
209 data you could, for example, use a front-end application to
212 For a detailed description on how to set this up, see
213 rrdcreate.
217 input via standard input (STDIN). With this feature you can improve
220 same arguments as on the command line and some special commands like
221 q\bqu\bui\bit\bt,\b, c\bcd\bd,\b, m\bmk\bkd\bdi\bir\br and l\bls\bs. For detailed help on the server commands type:
223 rrdtool help cd|mkdir|pwd|ls|quit
225 When a command is completed, RRDtool will print the string '"OK"',
226 followed by timing information of the form u\bu:\b:_\bu_\bs_\be_\br_\bt_\bi_\bm_\be s\bs:\b:_\bs_\by_\bs_\bt_\be_\bm_\bt_\bi_\bm_\be.
227 Both values are the running totals of seconds since RRDtool was
228 started. If an error occurs, a line of the form '"ERROR:" _\bD_\be_\bs_\bc_\br_\bi_\bp_\bt_\bi_\bo_\bn
229 _\bo_\bf _\be_\br_\br_\bo_\br' will be printed instead. R\bRR\bRD\bDt\bto\boo\bol\bl will not abort, unless
231 is 0, RRDtool will do a chroot to that workdir. If the UID is not 0,
235 If you want to create a RRD-Server, you must choose a TCP/IP Service
238 rrdsrv 13900/tcp # RRD server
240 Attention: the TCP port 13900 isn't officially registered for rrdsrv.
241 You can use any unused port in your services file, but the server and
242 the client system must use the same port, of course.
244 With this configuration you can add RRDtool as meta-server to
247 rrdsrv stream tcp nowait root /opt/rrd/bin/rrdtool rrdtool - /var/rrd
249 Don't forget to create the database directory /var/rrd and reinitialize
250 your inetd.
252 If all was setup correctly, you can access the server with Perl
253 sockets, tools like netcat, or in a quick interactive test by using
254 'telnet localhost rrdsrv'.
257 such a port unless you are sure what you are doing.
260 rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast,
261 rrdxport
264 Bugs? Features!
267 Tobias Oetiker <tobi@oetiker.ch>
271 1.3.8 2008-12-22 RRDTOOL(1)