lfc.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  4. <!ENTITY mdash "&#x2014;" >
  5. ]>
  6. <chapter id="kea-lfc">
  7. <title>The LFC process</title>
  8. <section id="kea-lfc-overview">
  9. <title>Overview</title>
  10. <para><command>kea-lfc</command> is a service process that removes
  11. redundant information from the files used to provide persistent storage
  12. for the memfile data base backend. This service is written to run as a
  13. stand alone process.
  14. </para>
  15. <para>While <command>kea-lfc</command> can be started externally, there is
  16. usually no need to do this. <command>kea-lfc</command> is run on a periodic
  17. basis by the Kea DHCP servers.
  18. </para>
  19. <para>The process operates on a set of files, using them for input and output
  20. of the lease entries and to indicate where it is in the process in case of an
  21. interruption. Currently the caller must supply names for all of the files, in
  22. the future this requirement may be relaxed with the process getting the names
  23. from either the config file or from defaults.
  24. </para>
  25. </section>
  26. <section id="kea-lfc-usage">
  27. <title>Command Line Options</title>
  28. <para><command>kea-lfc</command> is run as follows:
  29. <screen>
  30. kea-lfc [-4 | -6] -c config-file -p pid-file -x previous-file -i copy-file -o output-file -f finish-file
  31. </screen>
  32. </para>
  33. <para>The argument <command>-4</command> or <command>-6</command> selects the protocol
  34. version of the lease files.
  35. </para>
  36. <para>The <command>-c</command> argument specifies the configuration file. This is
  37. required, but not currently used by the process.
  38. </para>
  39. <para>The <command>-p</command> argument specifies the PID file. When the
  40. <command>kea-lfc</command> process starts it attempts to determine if another
  41. instance of the process is already running by examining the pid file. If one
  42. is already running the new process is terminated. If one isn't running it writes
  43. its pid into the pid file.
  44. </para>
  45. <para>The other filenames specify where the <command>kea-lfc</command> process
  46. should look for input, write its output and use for bookkeeping.
  47. <itemizedlist>
  48. <listitem><simpara>
  49. <command>previous</command> &mdash;
  50. When <command>kea-lfc</command> starts this
  51. is the result of any previous run of <command>kea-lfc</command>.
  52. When <command>kea-lfc</command> finishes it is the result of this run.
  53. If <command>kea-lfc</command> is interrupted before completing,
  54. this file may not exist.
  55. </simpara></listitem>
  56. <listitem><simpara>
  57. <command>input</command> &mdash;
  58. Before the DHCP server invokes <command>kea-lfc</command> it will
  59. move the current lease file here and then call <command>kea-lfc</command>
  60. with this file.
  61. </simpara></listitem>
  62. <listitem><simpara>
  63. <command>output</command> &mdash;
  64. The temporary file <command>kea-lfc</command> should use to write the leases.
  65. Upon completion of writing this file, it will be moved to the finish file
  66. (see below).
  67. </simpara></listitem>
  68. <listitem><simpara>
  69. <command>finish</command> &mdash;
  70. Another temporary file <command>kea-lfc</command> uses for bookkeeping. When
  71. <command>kea-lfc</command> completes writing the outputfile it moves it to this
  72. file name. After <command>kea-lfc</command> finishes deleting the other files
  73. (previous and input) it moves this file to previous lease file. By moving the
  74. files in this fashion the <command>kea-lfc</command> and the DHCP server
  75. processes can determine the correct file to use even if one of the
  76. processes was interrupted before completing its task.
  77. </simpara></listitem>
  78. </itemizedlist>
  79. </para>
  80. <para>There are several additional arguments mostly for debugging purposes.
  81. <command>-d</command> Sets the logging level to debug. <command>-v</command> and
  82. <command>-V</command> print out version stamps with <command>-V</command> providing
  83. a longer form. <command>-h</command> prints out the usage string.
  84. </para>
  85. </section>
  86. </chapter>