Code

Imported upstream version 1.3rc9.
[pkg-rrdtool.git] / doc / rrdupdate.html
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>rrdupdate</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:root@localhost" />
8 </head>
10 <body style="background-color: white">
12 <p><a name="__index__"></a></p>
13 <!-- INDEX BEGIN -->
14 <!--
16 <ul>
18         <li><a href="#name">NAME</a></li>
19         <li><a href="#synopsis">SYNOPSIS</a></li>
20         <li><a href="#description">DESCRIPTION</a></li>
21         <li><a href="#example">EXAMPLE</a></li>
22         <li><a href="#author">AUTHOR</a></li>
23 </ul>
24 -->
25 <!-- INDEX END -->
27 <p>
28 </p>
29 <h1><a name="name">NAME</a></h1>
30 <p>rrdupdate - Store a new set of values into the RRD</p>
31 <p>
32 </p>
33 <hr />
34 <h1><a name="synopsis">SYNOPSIS</a></h1>
35 <p><strong>rrdtool</strong> {<strong>update</strong> | <strong>updatev</strong>} <em>filename</em>
36 [<strong>--template</strong>|<strong>-t</strong>&nbsp;<em>ds-name</em>[<strong>:</strong><em>ds-name</em>]...]
37 <strong>N</strong>|<em>timestamp</em><strong>:</strong><em>value</em>[<strong>:</strong><em>value</em>...]
38 <em>at-timestamp</em><strong>@</strong><em>value</em>[<strong>:</strong><em>value</em>...]
39 [<em>timestamp</em><strong>:</strong><em>value</em>[<strong>:</strong><em>value</em>...]&nbsp;...]</p>
40 <p>
41 </p>
42 <hr />
43 <h1><a name="description">DESCRIPTION</a></h1>
44 <p>The <strong>update</strong> function feeds new data values into an <strong>RRD</strong>. The data
45 is time aligned (interpolated) according to the properties of the
46 <strong>RRD</strong> to which the data is written.</p>
47 <dl>
48 <dt><strong><a name="item_updatev"><strong>updatev</strong></a></strong></dt>
50 <dd>
51 <p>This alternate version of <strong>update</strong> takes the same arguments and
52 performs the same function. The <em>v</em> stands for <em>verbose</em>, which
53 describes the output returned. <strong>updatev</strong> returns a list of any and all
54 consolidated data points (CDPs) written to disk as a result of the
55 invocation of update. The values are indexed by timestamp (time_t),
56 RRA (consolidation function and PDPs per CDP), and data source (name).
57 Note that depending on the arguments of the current and previous call to
58 update, the list may have no entries or a large number of entries.</p>
59 </dd>
60 <dt><strong><a name="item_filename"><em>filename</em></a></strong></dt>
62 <dd>
63 <p>The name of the <strong>RRD</strong> you want to update.</p>
64 </dd>
65 <dt><strong><a name="item__2d_2dtemplate_7c_2dt_ds_2dname_5b_3ads_2dname_5d_"><strong>--template</strong>|<strong>-t</strong> <em>ds-name</em>[<strong>:</strong><em>ds-name</em>]...</a></strong></dt>
67 <dd>
68 <p>By default, the <strong>update</strong> function expects its data input in the order
69 the data sources are defined in the RRD, excluding any COMPUTE data
70 sources (i.e. if the third data source <strong>DST</strong> is COMPUTE, the third
71 input value will be mapped to the fourth data source in the <strong>RRD</strong> and
72 so on). This is not very error resistant, as you might be sending the
73 wrong data into an RRD.</p>
74 <p>The template switch allows you to specify which data sources you are
75 going to update and in which order. If the data sources specified in
76 the template are not available in the RRD file, the update process
77 will abort with an error message.</p>
78 <p>While it appears possible with the template switch to update data sources
79 asynchronously, <strong>RRDtool</strong> implicitly assigns non-COMPUTE data sources missing
80 from the template the <em>*UNKNOWN*</em> value.</p>
81 <p>Do not specify a value for a COMPUTE <strong>DST</strong> in the <strong>update</strong>
82 function. If this is done accidentally (and this can only be done
83 using the template switch), <strong>RRDtool</strong> will ignore the value specified
84 for the COMPUTE <strong>DST</strong>.</p>
85 </dd>
86 <dt><strong><a name="item_n_7ctimestamp_3avalue_5b_3avalue_2e_2e_2e_5d"><strong>N</strong>|<em>timestamp</em><strong>:</strong><em>value</em>[<strong>:</strong><em>value</em>...]</a></strong></dt>
88 <dd>
89 <p>The data used for updating the RRD was acquired at a certain
90 time. This time can either be defined in seconds since 1970-01-01 or
91 by using the letter 'N', in which case the update time is set to be
92 the current time. Negative time values are subtracted from the current
93 time. An AT_STYLE TIME SPECIFICATION (see the <em>rrdfetch</em>
94 documentation) may also be used by delimiting the end of the time
95 specification with the '@' character instead of a ':'. Getting the
96 timing right to the second is especially important when you are
97 working with data-sources of type <strong>COUNTER</strong>, <strong>DERIVE</strong> or
98 <strong>ABSOLUTE</strong>.</p>
99 <p>The remaining elements of the argument are DS updates. The order of
100 this list is the same as the order the data sources were defined in
101 the RRA. If there is no data for a certain data-source, the letter
102 <strong>U</strong> (e.g., N:0.1:U:1) can be specified.</p>
103 <p>The format of the value acquired from the data source is dependent on
104 the data source type chosen. Normally it will be numeric, but the data
105 acquisition modules may impose their very own parsing of this
106 parameter as long as the colon (<strong>:</strong>) remains the data source value
107 separator.</p>
108 </dd>
109 </dl>
110 <p>
111 </p>
112 <hr />
113 <h1><a name="example">EXAMPLE</a></h1>
114 <p><code>rrdtool update demo1.rrd N:3.44:3.15:U:23</code></p>
115 <p>Update the database file demo1.rrd with 3 known and one <em>*UNKNOWN*</em>
116 value. Use the current time as the update time.</p>
117 <p><code>rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7</code></p>
118 <p>Update the database file demo2.rrd which expects data from a single
119 data-source, three times. First with an <em>*UNKNOWN*</em> value then with two
120 regular readings. The update interval seems to be around 300 seconds.</p>
121 <p>
122 </p>
123 <hr />
124 <h1><a name="author">AUTHOR</a></h1>
125 <p>Tobias Oetiker &lt;<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>&gt;</p>
127 </body>
129 </html>