kea-lfc.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY mdash "&#8212;">]>
  4. <!--
  5. - Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
  6. -
  7. - This Source Code Form is subject to the terms of the Mozilla Public
  8. - License, v. 2.0. If a copy of the MPL was not distributed with this
  9. - file, You can obtain one at http://mozilla.org/MPL/2.0/.
  10. -->
  11. <refentry>
  12. <refentryinfo>
  13. <date>June 20, 2015</date>
  14. </refentryinfo>
  15. <refmeta>
  16. <refentrytitle>kea-lfc</refentrytitle>
  17. <manvolnum>8</manvolnum>
  18. <refmiscinfo>Kea</refmiscinfo>
  19. </refmeta>
  20. <refnamediv>
  21. <refname>kea-lfc</refname>
  22. <refpurpose>Lease File Cleanup process in Kea</refpurpose>
  23. </refnamediv>
  24. <docinfo>
  25. <copyright>
  26. <year>2015</year>
  27. <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
  28. </copyright>
  29. </docinfo>
  30. <refsynopsisdiv>
  31. <cmdsynopsis>
  32. <command>kea-lfc</command>
  33. <arg><option>-4|-6</option></arg>
  34. <arg><option>-c <replaceable class="parameter">config-file</replaceable></option></arg>
  35. <arg><option>-p <replaceable class="parameter">pid-file</replaceable></option></arg>
  36. <arg><option>-x <replaceable class="parameter">previous-file</replaceable></option></arg>
  37. <arg><option>-i <replaceable class="parameter">copy-file</replaceable></option></arg>
  38. <arg><option>-o <replaceable class="parameter">output-file</replaceable></option></arg>
  39. <arg><option>-f <replaceable class="parameter">finish-file</replaceable></option></arg>
  40. <arg><option>-v</option></arg>
  41. <arg><option>-V</option></arg>
  42. <arg><option>-W</option></arg>
  43. <arg><option>-d</option></arg>
  44. <arg><option>-h</option></arg>
  45. </cmdsynopsis>
  46. </refsynopsisdiv>
  47. <refsect1>
  48. <title>DESCRIPTION</title>
  49. <para>
  50. The <command>kea-lfc</command> service process removes redundant
  51. information from the files used to provide persistent storage for
  52. the memfile data base backend. The service is written to run as
  53. a stand alone process. While it can be started externally, there
  54. is usually no need to do this. It will be run on a periodic basis
  55. by the Kea DHCP servers.
  56. </para>
  57. </refsect1>
  58. <refsect1>
  59. <title>ARGUMENTS</title>
  60. <para>The arguments are as follows:</para>
  61. <variablelist>
  62. <varlistentry>
  63. <term><option>-d</option></term>
  64. <listitem><para>
  65. Verbose mode sets the logging level to debug. This is primarily
  66. for development purposes in stand-alone mode.
  67. </para></listitem>
  68. </varlistentry>
  69. <varlistentry>
  70. <term><option>-v</option></term>
  71. <listitem><para>
  72. version causes the version stamp to be printed.
  73. </para></listitem>
  74. </varlistentry>
  75. <varlistentry>
  76. <term><option>-V</option></term>
  77. <listitem><para>
  78. Version causes a longer form of the version stamp to be printed.
  79. </para></listitem>
  80. </varlistentry>
  81. <varlistentry>
  82. <term><option>-W</option></term>
  83. <listitem><para>
  84. Display the configuration report.
  85. </para></listitem>
  86. </varlistentry>
  87. <varlistentry>
  88. <term><option>-h</option></term>
  89. <listitem><para>
  90. Help causes the usage string to be printed.
  91. </para></listitem>
  92. </varlistentry>
  93. <varlistentry>
  94. <term><option>-4 | -6</option></term>
  95. <listitem><para>
  96. The protocol version of the lease files, must be one of 4 or 6.
  97. </para></listitem>
  98. </varlistentry>
  99. <varlistentry>
  100. <term><option>-c</option></term>
  101. <listitem><para>
  102. Configuration file including the configuration for
  103. <command>kea-lfc</command> process. It may also
  104. contain configuration entries for other Kea services.
  105. Currently <command>kea-lfc</command> gets all of its arguments from
  106. the comamnd line, in the future it will be extended to get some arguments
  107. from the config file.
  108. </para></listitem>
  109. </varlistentry>
  110. <varlistentry>
  111. <term><option>-p</option></term>
  112. <listitem><para>
  113. PID file - When the <command>kea-lfc</command> process starts
  114. it attempts to determine if another instance of the process is
  115. already running by examining the pid file. If one is already
  116. running the new process is terminated. If one isn't running it
  117. writes its pid into the pid file.
  118. </para></listitem>
  119. </varlistentry>
  120. <varlistentry>
  121. <term><option>-x</option></term>
  122. <listitem><para>
  123. Previous or ex lease file - When <command>kea-lfc</command> starts this
  124. is the result of any previous run of <command>kea-lfc</command>.
  125. When <command>kea-lfc</command> finishes it is the result of this run.
  126. If <command>kea-lfc</command> is interrupted before compelting
  127. this file may not exist.
  128. </para></listitem>
  129. </varlistentry>
  130. <varlistentry>
  131. <term><option>-i</option></term>
  132. <listitem><para>
  133. Input or copy of lease file - Before the DHCP server invokes
  134. <command>kea-lfc</command> it will move the current lease file
  135. here and then call <command>kea-lfc</command> with this file.
  136. </para></listitem>
  137. </varlistentry>
  138. <varlistentry>
  139. <term><option>-o</option></term>
  140. <listitem><para>
  141. Output lease file - The temporary file <command>kea-lfc</command>
  142. should use to write the leases. Upon completion of writing this
  143. this file it will be moved to the finish file (see below).
  144. </para></listitem>
  145. </varlistentry>
  146. <varlistentry>
  147. <term><option>-f</option></term>
  148. <listitem><para>
  149. Finish or completion file - Another temporary file
  150. <command>kea-lfc</command> uses for bookkeeping. When
  151. <command>kea-lfc</command> completes writing the output
  152. file it moves it to this file name. After
  153. <command>kea-lfc</command> finishes deleting the other
  154. files (previous and input) it moves this file to previous
  155. lease file. By moving the files in this fashion the
  156. <command>kea-lfc</command> and the DHCP server processes
  157. can determine the correct file to use even if one of the
  158. processes was interrupted before completing its task.
  159. </para></listitem>
  160. </varlistentry>
  161. </variablelist>
  162. </refsect1>
  163. <refsect1>
  164. <title>HISTORY</title>
  165. <para>
  166. The <command>kea-lfc</command> process was first coded in January
  167. 2015 by the ISC Kea/DHCP team.
  168. </para>
  169. </refsect1>
  170. </refentry><!--
  171. - Local variables:
  172. - mode: sgml
  173. - End:
  174. -->