Code

Imported upstream SVN snapshot 1.4~rc2+20090928.
[pkg-rrdtool.git] / doc / rrdcached.html
index 6bd0a37b83688856d9eff85d63bd4d4f0ea297f8..717be17ef38ce967e2c5f135a3527a9264351b43 100644 (file)
@@ -1,14 +1,18 @@
+<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdcached</title>
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-<p><a name="__index__"></a></p>
+
 <!-- INDEX BEGIN -->
+<div name="index">
+<p><a name="__index__"></a></p>
 <!--
 
 <ul>
        <li><a href="#error_reporting">ERROR REPORTING</a></li>
        <li><a href="#how_it_works">HOW IT WORKS</a></li>
        <li><a href="#security_considerations">SECURITY CONSIDERATIONS</a></li>
+       <ul>
+
+               <li><a href="#authentication">Authentication</a></li>
+               <li><a href="#authorization">Authorization</a></li>
+               <li><a href="#encryption">Encryption</a></li>
+               <li><a href="#sanity_checking">Sanity checking</a></li>
+               <li><a href="#conclusion">Conclusion</a></li>
+       </ul>
+
        <li><a href="#protocol">PROTOCOL</a></li>
        <ul>
 
        <li><a href="#author">AUTHOR</a></li>
        <li><a href="#contributors">CONTRIBUTORS</a></li>
 </ul>
+
 -->
+
+
+</div>
 <!-- INDEX END -->
 
 <p>
@@ -47,7 +64,8 @@
 <hr />
 <h1><a name="synopsis">SYNOPSIS</a></h1>
 <p><strong>rrdcached</strong>
-[<strong>-l/-L</strong>&nbsp;<em>address</em>]
+[<strong>-P</strong>&nbsp;<em>permissions</em>]
+[<strong>-l</strong>&nbsp;<em>address</em>]
 [<strong>-w</strong>&nbsp;<em>timeout</em>]
 [<strong>-z</strong>&nbsp;<em>delay</em>]
 [<strong>-f</strong>&nbsp;<em>timeout</em>]
@@ -77,135 +95,131 @@ section below.</p>
 <hr />
 <h1><a name="options">OPTIONS</a></h1>
 <dl>
-<dt><strong><a name="item__2dl_address"><strong>-l</strong> <em>address</em></a></strong><br />
-</dt>
+<dt><strong><a name="l_address" class="item"><strong>-l</strong> <em>address</em></a></strong></dt>
+
 <dd>
-Tells the daemon to bind to <em>address</em> and accept incoming connections on that
+<p>Tells the daemon to bind to <em>address</em> and accept incoming connections on that
 socket. If <em>address</em> begins with <code>unix:</code>, everything following that prefix is
 interpreted as the path to a UNIX domain socket. Otherwise the address or node
-name are resolved using <em>getaddrinfo</em>.
-</dd>
-<dd>
+name are resolved using <em>getaddrinfo</em>.</p>
 <p>For network sockets, a port may be specified by using the form
 <code>[address]:port</code>. If the address is an IPv4 address or a fully
 qualified domain name (i.&nbsp;e. the address contains at least one dot
 (<code>.</code>)), the square brackets can be omitted, resulting in the (simpler)
-<code>address:port</code> pattern.. The default port is <strong>42217/udp</strong>.</p>
-</dd>
-<dd>
+<code>address:port</code> pattern. The default port is <strong>42217/udp</strong>. If you
+specify a network socket, it is mandatory to read the
+<a href="#security_considerations">SECURITY CONSIDERATIONS</a> section.</p>
 <p>The following formats are accepted. Please note that the address of the UNIX
 domain socket <strong>must</strong> start with a slash in the second case!</p>
-</dd>
-<dd>
 <pre>
    unix:&lt;/path/to/unix.sock&gt;
    /&lt;path/to/unix.sock&gt;
    &lt;hostname-or-ip&gt;
    [&lt;hostname-or-ip&gt;]:&lt;port&gt;
    &lt;hostname-or-ipv4&gt;:&lt;port&gt;</pre>
-</dd>
-<dd>
 <p>If the <strong>-l</strong> option is not specified the default address,
 <code>unix:/tmp/rrdcached.sock</code>, will be used.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2dl_address"><strong>-L</strong> <em>address</em></a></strong><br />
-</dt>
+<dt><strong><a name="p_command_command" class="item"><strong>-P</strong> <em>command</em>[,<em>command</em>[,...]]</a></strong></dt>
+
 <dd>
-Same as <strong>-l</strong>, except creates a low-privilege socket.  See <strong>SECURITY
-CONSIDERATIONS</strong> for more information.
+<p>Specifies the commands accepted via a network socket. This allows
+administrators of <em>RRDCacheD</em> to control the actions accepted from various
+sources.</p>
+<p>The arguments given to the <strong>-P</strong> option is a comma separated list of commands.
+For example, to allow the <code>FLUSH</code> and <code>PENDING</code> commands one could specify:</p>
+<pre>
+  rrdcached -P FLUSH,PENDING $MORE_ARGUMENTS</pre>
+<p>The <strong>-P</strong> option effects the <em>following</em> socket addresses (the following <strong>-l</strong>
+options). In the following example, only the IPv4 network socket (address
+<code>10.0.0.1</code>) will be restricted to the <code>FLUSH</code> and <code>PENDING</code> commands:</p>
+<pre>
+  rrdcached -l unix:/some/path -P FLUSH,PENDING -l 10.0.0.1</pre>
+<p>A complete list of available commands can be found in the section
+<a href="#valid_commands">Valid Commands</a> below. There are two minor special exceptions:</p>
+<ul>
+<li>
+<p>The <code>HELP</code> and <a href="#quit"><code>QUIT</code></a> commands are always allowed.</p>
+</li>
+<li>
+<p>If the <a href="#batch"><code>BATCH</code></a> command is accepted, the <strong>.</strong>&nbsp;command will automatically
+be accepted, too.</p>
+</li>
+</ul>
+<p>Please also read <a href="#security_considerations">SECURITY CONSIDERATIONS</a> below.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2dw_timeout"><strong>-w</strong> <em>timeout</em></a></strong><br />
-</dt>
+<dt><strong><a name="w_timeout" class="item"><strong>-w</strong> <em>timeout</em></a></strong></dt>
+
 <dd>
-Data is written to disk every <em>timeout</em> seconds. If this option is not
-specified the default interval of 300&nbsp;seconds will be used.
+<p>Data is written to disk every <em>timeout</em> seconds. If this option is not
+specified the default interval of 300&nbsp;seconds will be used.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2dz_delay"><strong>-z</strong> <em>delay</em></a></strong><br />
-</dt>
+<dt><strong><a name="z_delay" class="item"><strong>-z</strong> <em>delay</em></a></strong></dt>
+
 <dd>
-If specified, rrdcached will delay writing of each RRD for a random number
+<p>If specified, rrdcached will delay writing of each RRD for a random number
 of seconds in the range&nbsp;[0,<em>delay</em>).  This will avoid too many
 writes being queued simultaneously.  This value should be no greater than
-the value specified in <strong>-w</strong>.  By default, there is no delay.
+the value specified in <strong>-w</strong>.  By default, there is no delay.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2df_timeout"><strong>-f</strong> <em>timeout</em></a></strong><br />
-</dt>
+<dt><strong><a name="f_timeout" class="item"><strong>-f</strong> <em>timeout</em></a></strong></dt>
+
 <dd>
-Every <em>timeout</em> seconds the entire cache is searched for old values which are
+<p>Every <em>timeout</em> seconds the entire cache is searched for old values which are
 written to disk. This only concerns files to which updates have stopped, so
 setting this to a high value, such as 3600&nbsp;seconds, is acceptable in most
-cases. This timeout defaults to 3600&nbsp;seconds.
+cases. This timeout defaults to 3600&nbsp;seconds.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2dp_file"><strong>-p</strong> <em>file</em></a></strong><br />
-</dt>
+<dt><strong><a name="p_file" class="item"><strong>-p</strong> <em>file</em></a></strong></dt>
+
 <dd>
-Sets the name and location of the PID-file. If not specified, the default,
-<code>$localststedir/run/rrdcached.pid</code> will be used.
+<p>Sets the name and location of the PID-file. If not specified, the default,
+<code>$localststedir/run/rrdcached.pid</code> will be used.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2dt_write_threads"><strong>-t</strong> <em>write_threads</em></a></strong><br />
-</dt>
+<dt><strong><a name="t_write_threads" class="item"><strong>-t</strong> <em>write_threads</em></a></strong></dt>
+
 <dd>
-Specifies the number of threads used for writing RRD files.  The default
+<p>Specifies the number of threads used for writing RRD files.  The default
 is&nbsp;4.  Increasing this number will allow rrdcached to have more
 simultaneous I/O requests into the kernel.  This may allow the kernel to
-re-order disk writes, resulting in better disk throughput.
+re-order disk writes, resulting in better disk throughput.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2dj_dir"><strong>-j</strong> <em>dir</em></a></strong><br />
-</dt>
+<dt><strong><a name="j_dir" class="item"><strong>-j</strong> <em>dir</em></a></strong></dt>
+
 <dd>
-Write updates to a journal in <em>dir</em>.  In the event of a program or system
+<p>Write updates to a journal in <em>dir</em>.  In the event of a program or system
 crash, this will allow the daemon to write any updates that were pending
-at the time of the crash.
-</dd>
-<dd>
+at the time of the crash.</p>
 <p>On startup, the daemon will check for journal files in this directory.  If
 found, all updates therein will be read into memory before the daemon
 starts accepting new connections.</p>
-</dd>
-<dd>
 <p>The journal will be rotated with the same frequency as the flush timer
 given by <strong>-f</strong>.</p>
-</dd>
-<dd>
 <p>When journaling is enabled, the daemon will use a fast shutdown procedure.
 Rather than flushing all files to disk, it will make sure the journal is
 properly written and exit immediately.  Although the RRD data files are
 not fully up-to-date, no information is lost; all pending updates will be
 replayed from the journal next time the daemon starts up.</p>
-</dd>
-<dd>
 <p>To disable fast shutdown, use the <strong>-F</strong> option.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2df"><strong>-F</strong></a></strong><br />
-</dt>
+<dt><strong><a name="f" class="item"><strong>-F</strong></a></strong></dt>
+
 <dd>
-ALWAYS flush all updates to the RRD data files when the daemon is shut
-down, regardless of journal setting.
+<p>ALWAYS flush all updates to the RRD data files when the daemon is shut
+down, regardless of journal setting.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2dg"><strong>-g</strong></a></strong><br />
-</dt>
+<dt><strong><a name="g" class="item"><strong>-g</strong></a></strong></dt>
+
 <dd>
-Run in the foreground.  The daemon will not fork().
+<p>Run in the foreground.  The daemon will not <code>fork()</code>.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item__2db_dir"><strong>-b</strong> <em>dir</em></a></strong><br />
-</dt>
+<dt><strong><a name="b_dir" class="item"><strong>-b</strong> <em>dir</em></a></strong></dt>
+
 <dd>
-The daemon will change into a specific directory at startup. All files passed
+<p>The daemon will change into a specific directory at startup. All files passed
 to the daemon, that are specified by a <strong>relative</strong> path, will be interpreted
 to be relative to this directory. If not given the default, <code>/tmp</code>, will be
-used.
-</dd>
-<dd>
+used.</p>
 <pre>
   +------------------------+------------------------+
   ! Command line           ! File updated           !
@@ -217,34 +231,25 @@ used.
   Paths given on the command  line and paths actually
   updated by the daemon,  assuming the base directory
   &quot;/tmp&quot;.</pre>
-</dd>
-<dd>
 <p><strong>WARNING:</strong> The paths up to and including the base directory <strong>MUST NOT BE</strong>
 symbolic links.  In other words, if the base directory is
 specified as:</p>
-</dd>
-<dd>
 <pre>
     -b /base/dir/somewhere</pre>
-</dd>
-<dd>
 <p>... then <strong>NONE</strong> of the following should be symbolic links:</p>
-</dd>
-<dd>
 <pre>
     /base
     /base/dir
     /base/dir/somewhere</pre>
 </dd>
-<p></p>
-<dt><strong><a name="item__2db"><strong>-B</strong></a></strong><br />
-</dt>
+<dt><strong><a name="b" class="item"><strong>-B</strong></a></strong></dt>
+
 <dd>
-Only permit writes into the base directory specified in <strong>-b</strong> (and any
+<p>Only permit writes into the base directory specified in <strong>-b</strong> (and any
 sub-directories).  This does <strong>NOT</strong> detect symbolic links.  Paths
-containing <code>../</code> will also be blocked.
+containing <code>../</code> will also be blocked.</p>
 </dd>
-<p></p></dl>
+</dl>
 <p>
 </p>
 <hr />
@@ -252,26 +257,26 @@ containing <code>../</code> will also be blocked.
 <p>The following commands may be made aware of the <strong>rrdcached</strong> using the command
 line argument <strong>--daemon</strong> or the environment variable <strong>RRDCACHED_ADDRESS</strong>:</p>
 <dl>
-<dt><strong><a name="item_dump"><strong>dump</strong></a></strong><br />
-</dt>
-<dt><strong><a name="item_fetch"><strong>fetch</strong></a></strong><br />
-</dt>
-<dt><strong><a name="item_flush"><strong>flush</strong></a></strong><br />
-</dt>
-<dt><strong><a name="item_graph"><strong>graph</strong></a></strong><br />
-</dt>
-<dt><strong><a name="item_graphv"><strong>graphv</strong></a></strong><br />
-</dt>
-<dt><strong><a name="item_info"><strong>info</strong></a></strong><br />
-</dt>
-<dt><strong><a name="item_last"><strong>last</strong></a></strong><br />
-</dt>
-<dt><strong><a name="item_lastupdate"><strong>lastupdate</strong></a></strong><br />
-</dt>
-<dt><strong><a name="item_update"><strong>update</strong></a></strong><br />
-</dt>
-<dt><strong><a name="item_xport"><strong>xport</strong></a></strong><br />
-</dt>
+<dt><strong><a name="dump" class="item"><strong>dump</strong></a></strong></dt>
+
+<dt><strong><a name="fetch" class="item"><strong>fetch</strong></a></strong></dt>
+
+<dt><strong><a name="flush" class="item"><strong>flush</strong></a></strong></dt>
+
+<dt><strong><a name="graph" class="item"><strong>graph</strong></a></strong></dt>
+
+<dt><strong><a name="graphv" class="item"><strong>graphv</strong></a></strong></dt>
+
+<dt><strong><a name="info" class="item"><strong>info</strong></a></strong></dt>
+
+<dt><strong><a name="last" class="item"><strong>last</strong></a></strong></dt>
+
+<dt><strong><a name="lastupdate" class="item"><strong>lastupdate</strong></a></strong></dt>
+
+<dt><strong><a name="update" class="item"><strong>update</strong></a></strong></dt>
+
+<dt><strong><a name="xport" class="item"><strong>xport</strong></a></strong></dt>
+
 </dl>
 <p>The <strong>update</strong> command can send values to the daemon instead of writing them to
 the disk itself. All other commands can send a <strong>FLUSH</strong> command (see below) to
@@ -293,32 +298,32 @@ to the system logging daemon using <em>syslog(3)</em>. The facility used is
 <h1><a name="how_it_works">HOW IT WORKS</a></h1>
 <p>When receiving an update, <strong>rrdcached</strong> does not write to disk but looks for an
 entry for that file in its internal tree. If not found, an entry is created
-including the current time (called ``First'' in the diagram below). This time is
+including the current time (called &quot;First&quot; in the diagram below). This time is
 <strong>not</strong> the time specified on the command line but the time the operating system
-considers to be ``now''. The value and time of the value (called ``Time'' in the
+considers to be &quot;now&quot;. The value and time of the value (called &quot;Time&quot; in the
 diagram below) are appended to the tree node.</p>
 <p>When appending a value to a tree node, it is checked whether it's time to write
 the values to disk. Values are written to disk if
 <code>now()&nbsp;-&nbsp;First&nbsp;&gt;=&nbsp;timeout</code>, where <code>timeout</code> is the timeout specified
-using the <strong>-w</strong> option, see <em>OPTIONS</em>. If the values are ``old enough'' they
-will be enqueued in the ``update queue'', i.&nbsp;e. they will be appended to
+using the <strong>-w</strong> option, see <em>OPTIONS</em>. If the values are &quot;old enough&quot; they
+will be enqueued in the &quot;update queue&quot;, i.&nbsp;e. they will be appended to
 the linked list shown below.  Because the tree nodes and the elements of the
 linked list are the same data structures in memory, any update to a file that
 has already been enqueued will be written with the next write to the RRD file,
 too.</p>
-<p>A separate ``update thread'' constantly dequeues the first element in the update
+<p>A separate &quot;update thread&quot; constantly dequeues the first element in the update
 queue and writes all its values to the appropriate file. So as long as the
 update queue is not empty files are written at the highest possible rate.</p>
 <p>Since the timeout of files is checked only when new values are added to the
-file, ``dead'' files, i.&nbsp;e. files that are not updated anymore, would never
+file, &quot;dead&quot; files, i.&nbsp;e. files that are not updated anymore, would never
 be written to disk. Therefore, every now and then, controlled by the <strong>-f</strong>
-option, the entire tree is walked and all ``old'' values are enqueued. Since this
-only affects ``dead'' files and walking the tree is relatively expensive, you
-should set the ``flush interval'' to a reasonably high value. The default is
+option, the entire tree is walked and all &quot;old&quot; values are enqueued. Since this
+only affects &quot;dead&quot; files and walking the tree is relatively expensive, you
+should set the &quot;flush interval&quot; to a reasonably high value. The default is
 3600&nbsp;seconds (one hour).</p>
 <p>The downside of caching values is that they won't show up in graphs generated
-from the RRD&nbsp;files. To get around this, the daemon provides the ``flush
-command'' to flush specific files. This means that the file is inserted at the
+from the RRD&nbsp;files. To get around this, the daemon provides the &quot;flush
+command&quot; to flush specific files. This means that the file is inserted at the
 <strong>head</strong> of the update queue or moved there if it is already enqueued. The flush
 command will return only after the file's pending updates have been written
 to disk.</p>
@@ -350,62 +355,81 @@ to disk.</p>
  +------------+    +------------+             +------------+</pre>
 <p>The above diagram demonstrates:</p>
 <ul>
-<li></li>
-Files/values are stored in a (balanced) tree.
-<p></p>
-<li></li>
-Tree nodes and entries in the update queue are the same data structure.
-<p></p>
-<li></li>
-The local time (``First'') and the time specified in updates (``Time'') may differ.
-<p></p>
-<li></li>
-Timed out values are inserted at the ``tail''.
-<p></p>
-<li></li>
-Explicitly flushed values are inserted at the ``head''.
-<p></p>
-<li></li>
-ASCII art rocks.
-<p></p></ul>
+<li>
+<p>Files/values are stored in a (balanced) tree.</p>
+</li>
+<li>
+<p>Tree nodes and entries in the update queue are the same data structure.</p>
+</li>
+<li>
+<p>The local time (&quot;First&quot;) and the time specified in updates (&quot;Time&quot;) may differ.</p>
+</li>
+<li>
+<p>Timed out values are inserted at the &quot;tail&quot;.</p>
+</li>
+<li>
+<p>Explicitly flushed values are inserted at the &quot;head&quot;.</p>
+</li>
+<li>
+<p>ASCII art rocks.</p>
+</li>
+</ul>
 <p>
 </p>
 <hr />
 <h1><a name="security_considerations">SECURITY CONSIDERATIONS</a></h1>
-<p>The client/server protocol does not have any authentication or
-authorization mechanism.  Therefore, take care to restrict which users can
-connect to the daemon.</p>
-<p>Control sockets are divided into high-privilege (<strong>-l</strong>) and low-privilege
-(<strong>-L</strong>) sockets.  High-privilege sockets accept all commands, whereas
-low-privilege sockets accept only <strong>FLUSH</strong>, <strong>STATS</strong>, and <strong>HELP</strong>.</p>
-<p>For a multi-user environment where only certain users require read/write
-access, the recommended configuration uses two sockets as follows:</p>
-<dl>
-<dt><strong><a name="item__2dl__2fprotected_2fdir_2frrd_2esock"><strong>-l</strong> <em>/protected/dir/rrd.sock</em></a></strong><br />
-</dt>
-<dd>
-Create a high-privilege unix-domain socket.  This should be protected with
-the same Unix permissions that are used to protect the RRD files.  Updates
-should be directed to this socket.
-</dd>
-<p></p>
-<dt><strong><a name="item__2dl_127_2e0_2e0_2e1"><strong>-L</strong> <em>127.0.0.1</em></a></strong><br />
-</dt>
-<dd>
-Create a low-privilege TCP socket listening on localhost.  All users on
-the local system may use this to trigger FLUSH of individual files.  Users
-with read-only access should be directed to this socket.
-</dd>
-<p></p></dl>
-<p>If you (want to) use the network capability, i.&nbsp;e. let the daemon bind to
-an IPv4 or IPv6 socket, it is <strong>your</strong> job to install a packet filter or similar
-mechanism to prevent unauthorized connections. Unless you have a dedicated VLAN
-or VPN for this, using the network option is probably a bad idea!</p>
+<p>
+</p>
+<h2><a name="authentication">Authentication</a></h2>
+<p>There is no authentication.</p>
+<p>The client/server protocol does not yet have any authentication mechanism. It
+is likely that authentication and encryption will be added in a future version,
+but for the time being it is the administrator's responsibility to secure the
+traffic from/to the daemon!</p>
+<p>It is highly recommended to install a packet filter or similar mechanism to
+prevent unauthorized connections. Unless you have a dedicated VLAN or VPN for
+this, using network sockets is probably a bad idea!</p>
+<p>
+</p>
+<h2><a name="authorization">Authorization</a></h2>
+<p>There is minimal per-socket authorization.</p>
+<p>Authorization is currently done on a per-socket basis. That means each socket
+has a list of commands it will accept and it will accept. It will accept only
+those commands explicitly listed but it will (currently) accept these commands
+from anyone reaching the socket.</p>
+<p>If the networking sockets are to be used, it is necessary to restrict the
+accepted commands to those needed by external clients. If, for example,
+external clients want to draw graphs of the cached data, they should only be
+allowed to use the <code>FLUSH</code> command.</p>
+<p>
+</p>
+<h2><a name="encryption">Encryption</a></h2>
+<p>There is no encryption.</p>
+<p>Again, this may be added in the future, but for the time being it is your job
+to keep your private data private. Install a VPN or an encrypted tunnel if you
+statistics are confidential!</p>
+<p>
+</p>
+<h2><a name="sanity_checking">Sanity checking</a></h2>
+<p>There is no sanity checking.</p>
 <p>The daemon will blindly write to any file it gets told, so you really should
 create a separate user just for this daemon. Also it does not do any sanity
 checks, so if it gets told to write values for a time far in the future, your
 files will be messed up good!</p>
+<p>
+</p>
+<h2><a name="conclusion">Conclusion</a></h2>
+<ul>
+<li>
+<p>Security is the job of the administrator.</p>
+</li>
+<li>
+<p>We recommend to allow write access via UNIX domain sockets only.</p>
+</li>
+<li>
 <p>You have been warned.</p>
+</li>
+</ul>
 <p>
 </p>
 <hr />
@@ -413,13 +437,13 @@ files will be messed up good!</p>
 <p>The daemon communicates with clients using a line based ASCII protocol which is
 easy to read and easy to type. This makes it easy for scripts to implement the
 protocol and possible for users to use <em>telnet</em> to connect to the daemon
-and test stuff ``by hand''.</p>
+and test stuff &quot;by hand&quot;.</p>
 <p>The protocol is line based, this means that each record consists of one or more
 lines. A line is terminated by the line feed character <code>0x0A</code>, commonly
 written as <code>\n</code>. In the examples below, this character will be written as
-<code>&lt;LF&gt;</code> (``line feed'').</p>
+<code>&lt;LF&gt;</code> (&quot;line feed&quot;).</p>
 <p>After the connection has been established, the client is expected to send a
-``command''. A command consists of the command keyword, possibly some arguments,
+&quot;command&quot;. A command consists of the command keyword, possibly some arguments,
 and a terminating newline character. For a list of commands, see
 <a href="#valid_commands">Valid Commands</a> below.</p>
 <p>Example:</p>
@@ -442,72 +466,58 @@ status line.</p>
 <h2><a name="valid_commands">Valid Commands</a></h2>
 <p>The following commands are understood by the daemon:</p>
 <dl>
-<dt><strong><a name="item_flush_filename"><strong>FLUSH</strong> <em>filename</em></a></strong><br />
-</dt>
+<dt><strong><a name="flush_filename" class="item"><strong>FLUSH</strong> <em>filename</em></a></strong></dt>
+
 <dd>
-Causes the daemon to put <em>filename</em> to the <strong>head</strong> of the update queue
+<p>Causes the daemon to put <em>filename</em> to the <strong>head</strong> of the update queue
 (possibly moving it there if the node is already enqueued). The answer will be
-sent <strong>after</strong> the node has been dequeued.
+sent <strong>after</strong> the node has been dequeued.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_flushall"><strong>FLUSHALL</strong></a></strong><br />
-</dt>
+<dt><strong><a name="flushall" class="item"><strong>FLUSHALL</strong></a></strong></dt>
+
 <dd>
-Causes the daemon to start flushing ALL pending values to disk.  This
-returns immediately, even though the writes may take a long time.
+<p>Causes the daemon to start flushing ALL pending values to disk.  This
+returns immediately, even though the writes may take a long time.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_pending_filename"><strong>PENDING</strong> <em>filename</em></a></strong><br />
-</dt>
+<dt><strong><a name="pending_filename" class="item"><strong>PENDING</strong> <em>filename</em></a></strong></dt>
+
 <dd>
-Shows any ``pending'' updates for a file, in order.  The updates shown have
-not yet been written to the underlying RRD file.
+<p>Shows any &quot;pending&quot; updates for a file, in order.  The updates shown have
+not yet been written to the underlying RRD file.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_forget_filename"><strong>FORGET</strong> <em>filename</em></a></strong><br />
-</dt>
+<dt><strong><a name="forget_filename" class="item"><strong>FORGET</strong> <em>filename</em></a></strong></dt>
+
 <dd>
-Removes <em>filename</em> from the cache.  Any pending updates <strong>WILL BE LOST</strong>.
+<p>Removes <em>filename</em> from the cache.  Any pending updates <strong>WILL BE LOST</strong>.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_queue"><strong>QUEUE</strong></a></strong><br />
-</dt>
+<dt><strong><a name="queue" class="item"><strong>QUEUE</strong></a></strong></dt>
+
 <dd>
-Shows the files that are on the output queue.  Returns zero or more lines
+<p>Shows the files that are on the output queue.  Returns zero or more lines
 in the following format, where &lt;num_vals&gt; is the number of values
-to be written for the &lt;file&gt;:
-</dd>
-<dd>
+to be written for the &lt;file&gt;:</p>
 <pre>
     &lt;num_vals&gt; &lt;file&gt;</pre>
 </dd>
-<p></p>
-<dt><strong><a name="item_help__5bcommand_5d"><strong>HELP</strong> [<em>command</em>]</a></strong><br />
-</dt>
+<dt><strong><a name="help_command" class="item"><strong>HELP</strong> [<em>command</em>]</a></strong></dt>
+
 <dd>
-Returns a short usage message. If no command is given, or <em>command</em> is
+<p>Returns a short usage message. If no command is given, or <em>command</em> is
 <strong>HELP</strong>, a list of commands supported by the daemon is returned. Otherwise a
 short description, possibly containing a pointer to a manual page, is returned.
 Obviously, this is meant for interactive usage and the format in which the
-commands and usage summaries are returned is not well defined.
+commands and usage summaries are returned is not well defined.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_stats"><strong>STATS</strong></a></strong><br />
-</dt>
+<dt><strong><a name="stats" class="item"><strong>STATS</strong></a></strong></dt>
+
 <dd>
-Returns a list of metrics which can be used to measure the daemons performance
+<p>Returns a list of metrics which can be used to measure the daemons performance
 and check its status. For a description of the values returned, see
-<a href="#performance_values">Performance Values</a> below.
-</dd>
-<dd>
+<a href="#performance_values">Performance Values</a> below.</p>
 <p>The format in which the values are returned is similar to many other line based
 protocols: Each value is printed on a separate line, each consisting of the
 name of the value, a colon, one or more spaces and the actual value.</p>
-</dd>
-<dd>
 <p>Example:</p>
-</dd>
-<dd>
 <pre>
  9 Statistics follow
  QueueLength: 0
@@ -520,49 +530,38 @@ name of the value, a colon, one or more spaces and the actual value.</p>
  JournalBytes: 190
  JournalRotate: 0</pre>
 </dd>
-<p></p>
-<dt><strong><a name="item_update_filename_values__5bvalues__2e_2e_2e_5d"><strong>UPDATE</strong> <em>filename</em> <em>values</em> [<em>values</em> ...]</a></strong><br />
-</dt>
+<dt><strong><a name="update_filename_values_values" class="item"><strong>UPDATE</strong> <em>filename</em> <em>values</em> [<em>values</em> ...]</a></strong></dt>
+
 <dd>
-Adds more data to a filename. This is <strong>the</strong> operation the daemon was designed
+<p>Adds more data to a filename. This is <strong>the</strong> operation the daemon was designed
 for, so describing the mechanism again is unnecessary. Read <a href="#how_it_works">HOW IT WORKS</a>
-above for a detailed explanation.
-</dd>
-<dd>
+above for a detailed explanation.</p>
 <p>Note that rrdcached only accepts absolute timestamps in the update values.
-Updates strings like ``N:1:2:3'' are automatically converted to absolute
+Updates strings like &quot;N:1:2:3&quot; are automatically converted to absolute
 time by the RRD client library before sending to rrdcached.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_wrote_filename"><strong>WROTE</strong> <em>filename</em></a></strong><br />
-</dt>
+<dt><strong><a name="wrote_filename" class="item"><strong>WROTE</strong> <em>filename</em></a></strong></dt>
+
 <dd>
-This command is written to the journal after a file is successfully
+<p>This command is written to the journal after a file is successfully
 written out to disk.  It is used during journal replay to determine which
 updates have already been applied.  It is <em>only</em> valid in the journal; it
-is not accepted from the other command channels.
+is not accepted from the other command channels.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_batch"><strong>BATCH</strong></a></strong><br />
-</dt>
+<dt><strong><a name="batch" class="item"><strong>BATCH</strong></a></strong></dt>
+
 <dd>
-This command initiates the bulk load of multiple commands.  This is
+<p>This command initiates the bulk load of multiple commands.  This is
 designed for installations with extremely high update rates, since it
-permits more than one command to be issued per <code>read()</code> and write().
-</dd>
-<dd>
+permits more than one command to be issued per <code>read()</code> and <code>write()</code>.</p>
 <p>All commands are executed just as they would be if given individually,
 except for output to the user.  Messages indicating success are
 suppressed, and error messages are delayed until the client is finished.</p>
-</dd>
-<dd>
-<p>Command processing is finished when the client sends a dot (``.'') on its
+<p>Command processing is finished when the client sends a dot (&quot;.&quot;) on its
 own line.  After the client has finished, the server responds with an
 error count and the list of error messages (if any).  Each error messages
 indicates the number of the command to which it corresponds, and the error
 message itself.  The first user command after <strong>BATCH</strong> is command number one.</p>
-</dd>
-<dd>
 <pre>
     client:  BATCH
     server:  0 Go ahead.  End with dot '.' on its own line.
@@ -574,105 +573,94 @@ message itself.  The first user command after <strong>BATCH</strong> is command
     server:  1 message for command 1
     server:  12 message for command 12</pre>
 </dd>
-<p></p>
-<dt><strong><a name="item_quit"><strong>QUIT</strong></a></strong><br />
-</dt>
+<dt><strong><a name="quit" class="item"><strong>QUIT</strong></a></strong></dt>
+
 <dd>
-Disconnect from rrdcached.
+<p>Disconnect from rrdcached.</p>
 </dd>
-<p></p></dl>
+</dl>
 <p>
 </p>
 <h2><a name="performance_values">Performance Values</a></h2>
 <p>The following counters are returned by the <strong>STATS</strong> command:</p>
 <dl>
-<dt><strong><a name="item_queuelength"><strong>QueueLength</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
-</dt>
+<dt><strong><a name="queuelength" class="item"><strong>QueueLength</strong> <em>(unsigned 64bit integer)</em></a></strong></dt>
+
 <dd>
-Number of nodes currently enqueued in the update queue.
+<p>Number of nodes currently enqueued in the update queue.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_updatesreceived"><strong>UpdatesReceived</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
-</dt>
+<dt><strong><a name="updatesreceived" class="item"><strong>UpdatesReceived</strong> <em>(unsigned 64bit integer)</em></a></strong></dt>
+
 <dd>
-Number of UPDATE commands received.
+<p>Number of UPDATE commands received.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_flushesreceived"><strong>FlushesReceived</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
-</dt>
+<dt><strong><a name="flushesreceived" class="item"><strong>FlushesReceived</strong> <em>(unsigned 64bit integer)</em></a></strong></dt>
+
 <dd>
-Number of FLUSH commands received.
+<p>Number of FLUSH commands received.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_updateswritten"><strong>UpdatesWritten</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
-</dt>
+<dt><strong><a name="updateswritten" class="item"><strong>UpdatesWritten</strong> <em>(unsigned 64bit integer)</em></a></strong></dt>
+
 <dd>
-Total number of updates, i.&nbsp;e. calls to <code>rrd_update_r</code>, since the
-daemon was started.
+<p>Total number of updates, i.&nbsp;e. calls to <code>rrd_update_r</code>, since the
+daemon was started.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_datasetswritten"><strong>DataSetsWritten</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
-</dt>
+<dt><strong><a name="datasetswritten" class="item"><strong>DataSetsWritten</strong> <em>(unsigned 64bit integer)</em></a></strong></dt>
+
 <dd>
-Total number of ``data sets'' written to disk since the daemon was
+<p>Total number of &quot;data sets&quot; written to disk since the daemon was
 started. A data set is one or more values passed to the <strong>UPDATE</strong>
 command. For example: <code>1223661439:123:456</code> is one data set with two
-values. The term ``data set'' is used to prevent confusion whether
-individual values or groups of values are counted.
+values. The term &quot;data set&quot; is used to prevent confusion whether
+individual values or groups of values are counted.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_treenodesnumber"><strong>TreeNodesNumber</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
-</dt>
+<dt><strong><a name="treenodesnumber" class="item"><strong>TreeNodesNumber</strong> <em>(unsigned 64bit integer)</em></a></strong></dt>
+
 <dd>
-Number of nodes in the cache.
+<p>Number of nodes in the cache.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_treedepth"><strong>TreeDepth</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
-</dt>
+<dt><strong><a name="treedepth" class="item"><strong>TreeDepth</strong> <em>(unsigned 64bit integer)</em></a></strong></dt>
+
 <dd>
-Depth of the tree used for fast key lookup.
+<p>Depth of the tree used for fast key lookup.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_journalbytes"><strong>JournalBytes</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
-</dt>
+<dt><strong><a name="journalbytes" class="item"><strong>JournalBytes</strong> <em>(unsigned 64bit integer)</em></a></strong></dt>
+
 <dd>
-Total number of bytes written to the journal since startup.
+<p>Total number of bytes written to the journal since startup.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_journalrotate"><strong>JournalRotate</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
-</dt>
+<dt><strong><a name="journalrotate" class="item"><strong>JournalRotate</strong> <em>(unsigned 64bit integer)</em></a></strong></dt>
+
 <dd>
-Number of times the journal has been rotated since startup.
+<p>Number of times the journal has been rotated since startup.</p>
 </dd>
-<p></p></dl>
+</dl>
 <p>
 </p>
 <hr />
 <h1><a name="signals">SIGNALS</a></h1>
 <dl>
-<dt><strong><a name="item_sigint_and_sigterm">SIGINT and SIGTERM</a></strong><br />
-</dt>
+<dt><strong><a name="sigint_and_sigterm" class="item">SIGINT and SIGTERM</a></strong></dt>
+
 <dd>
-The daemon exits normally on receipt of either of these signals.  Pending
-updates are handled in accordance with the <strong>-j</strong> and <strong>-F</strong> options.
+<p>The daemon exits normally on receipt of either of these signals.  Pending
+updates are handled in accordance with the <strong>-j</strong> and <strong>-F</strong> options.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_sigusr1">SIGUSR1</a></strong><br />
-</dt>
+<dt><strong><a name="sigusr1" class="item">SIGUSR1</a></strong></dt>
+
 <dd>
-The daemon exits AFTER flushing all updates out to disk.  This may take a
-while.
+<p>The daemon exits AFTER flushing all updates out to disk.  This may take a
+while.</p>
 </dd>
-<p></p>
-<dt><strong><a name="item_sigusr2">SIGUSR2</a></strong><br />
-</dt>
+<dt><strong><a name="sigusr2" class="item">SIGUSR2</a></strong></dt>
+
 <dd>
-The daemon exits immediately, without flushing updates out to disk.
+<p>The daemon exits immediately, without flushing updates out to disk.
 Pending updates will be replayed from the journal when the daemon starts
 up again.  <strong>WARNING: if journaling (-j) is NOT enabled, any pending
-updates WILL BE LOST</strong>.
+updates WILL BE LOST</strong>.</p>
 </dd>
-<p></p></dl>
+</dl>
 <p>
 </p>
 <hr />