Code

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