Code

Imported upstream version 1.2.26
[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>
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 </li>
61 <dt><strong><a name="item_filename"><em>filename</em></a></strong>
63 <dd>
64 <p>The name of the <strong>RRD</strong> you want to update.</p>
65 </dd>
66 </li>
67 <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>
69 <dd>
70 <p>By default, the <strong>update</strong> function expects its data input in the order
71 the data sources are defined in the RRD, excluding any COMPUTE data
72 sources (i.e. if the third data source <strong>DST</strong> is COMPUTE, the third
73 input value will be mapped to the fourth data source in the <strong>RRD</strong> and
74 so on). This is not very error resistant, as you might be sending the
75 wrong data into an RRD.</p>
76 </dd>
77 <dd>
78 <p>The template switch allows you to specify which data sources you are
79 going to update and in which order. If the data sources specified in
80 the template are not available in the RRD file, the update process
81 will abort with an error message.</p>
82 </dd>
83 <dd>
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 </dd>
88 <dd>
89 <p>Do not specify a value for a COMPUTE <strong>DST</strong> in the <strong>update</strong>
90 function. If this is done accidentally (and this can only be done
91 using the template switch), <strong>RRDtool</strong> will ignore the value specified
92 for the COMPUTE <strong>DST</strong>.</p>
93 </dd>
94 </li>
95 <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>
97 <dd>
98 <p>The data used for updating the RRD was acquired at a certain
99 time. This time can either be defined in seconds since 1970-01-01 or
100 by using the letter 'N', in which case the update time is set to be
101 the current time. Negative time values are subtracted from the current
102 time. An AT_STYLE TIME SPECIFICATION (see the <em>rrdfetch</em>
103 documentation) may also be used by delimiting the end of the time
104 specification with the '@' character instead of a ':'. Getting the
105 timing right to the second is especially important when you are
106 working with data-sources of type <strong>COUNTER</strong>, <strong>DERIVE</strong> or
107 <strong>ABSOLUTE</strong>.</p>
108 </dd>
109 <dd>
110 <p>The remaining elements of the argument are DS updates. The order of
111 this list is the same as the order the data sources were defined in
112 the RRA. If there is no data for a certain data-source, the letter
113 <strong>U</strong> (e.g., N:0.1:U:1) can be specified.</p>
114 </dd>
115 <dd>
116 <p>The format of the value acquired from the data source is dependent on
117 the data source type chosen. Normally it will be numeric, but the data
118 acquisition modules may impose their very own parsing of this
119 parameter as long as the colon (<strong>:</strong>) remains the data source value
120 separator.</p>
121 </dd>
122 </li>
123 </dl>
124 <p>
125 </p>
126 <hr />
127 <h1><a name="example">EXAMPLE</a></h1>
128 <p><code>rrdtool update demo1.rrd N:3.44:3.15:U:23</code></p>
129 <p>Update the database file demo1.rrd with 3 known and one <em>*UNKNOWN*</em>
130 value. Use the current time as the update time.</p>
131 <p><code>rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7</code></p>
132 <p>Update the database file demo2.rrd which expects data from a single
133 data-source, three times. First with an <em>*UNKNOWN*</em> value then with two
134 regular readings. The update interval seems to be around 300 seconds.</p>
135 <p>
136 </p>
137 <hr />
138 <h1><a name="author">AUTHOR</a></h1>
139 <p>Tobias Oetiker &lt;<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>&gt;</p>
141 </body>
143 </html>