sysklogd.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-sysklogd" role="wrap" revision="sysv">
  8. <?dbhtml filename="sysklogd.html"?>
  9. <sect1info condition="script">
  10. <productname>sysklogd</productname>
  11. <productnumber>&sysklogd-version;</productnumber>
  12. <address>&sysklogd-url;</address>
  13. </sect1info>
  14. <title>Sysklogd-&sysklogd-version;</title>
  15. <indexterm zone="ch-system-sysklogd">
  16. <primary sortas="a-Sysklogd">Sysklogd</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>Sysklogd 软件包包含记录系统消息的程序,
  21. 例如在意外情况发生时内核给出的消息。</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&sysklogd-ch6-sbu;</seg>
  27. <seg>&sysklogd-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>安装 Sysklogd</title>
  33. <para>首先,修复 klogd 中在特定情况下会发生段错误的问题,
  34. 并修复一个过时的程序结构:</para>
  35. <screen><userinput remap="pre">sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c
  36. sed -i 's/union wait/int/' syslogd.c</userinput></screen>
  37. <para>编译该软件包:</para>
  38. <screen><userinput remap="make">make</userinput></screen>
  39. <para>该软件包不包含测试套件。</para>
  40. <para>安装该软件包:</para>
  41. <screen><userinput remap="install">make BINDIR=/sbin install</userinput></screen>
  42. </sect2>
  43. <sect2 id="conf-sysklogd" role="configuration">
  44. <title>配置 Sysklogd</title>
  45. <indexterm zone="conf-sysklogd">
  46. <primary sortas="a-Sysklogd">Sysklogd</primary>
  47. <secondary>configuring</secondary>
  48. </indexterm>
  49. <indexterm zone="conf-sysklogd">
  50. <primary sortas="e-/etc/syslog.conf">/etc/syslog.conf</primary>
  51. </indexterm>
  52. <para>执行以下命令,创建一个新的 <filename>/etc/syslog.conf</filename>
  53. 文件:</para>
  54. <screen><userinput>cat &gt; /etc/syslog.conf &lt;&lt; "EOF"
  55. <literal># Begin /etc/syslog.conf
  56. auth,authpriv.* -/var/log/auth.log
  57. *.*;auth,authpriv.none -/var/log/sys.log
  58. daemon.* -/var/log/daemon.log
  59. kern.* -/var/log/kern.log
  60. mail.* -/var/log/mail.log
  61. user.* -/var/log/user.log
  62. *.emerg *
  63. # End /etc/syslog.conf</literal>
  64. EOF</userinput></screen>
  65. </sect2>
  66. <sect2 id="contents-sysklogd" role="content">
  67. <title>Sysklogd 的内容</title>
  68. <segmentedlist>
  69. <segtitle>安装的程序</segtitle>
  70. <seglistitem>
  71. <seg>klogd 和 syslogd</seg>
  72. </seglistitem>
  73. </segmentedlist>
  74. <variablelist>
  75. <bridgehead renderas="sect3">简要描述</bridgehead>
  76. <?dbfo list-presentation="list"?>
  77. <?dbhtml list-presentation="table"?>
  78. <varlistentry id="klogd">
  79. <term><command>klogd</command></term>
  80. <listitem>
  81. <para>一个截获并记录内核消息的系统守护程序</para>
  82. <indexterm zone="ch-system-sysklogd klogd">
  83. <primary sortas="b-klogd">klogd</primary>
  84. </indexterm>
  85. </listitem>
  86. </varlistentry>
  87. <varlistentry id="syslogd">
  88. <term><command>syslogd</command></term>
  89. <listitem>
  90. <para>记录系统程序提供给日志系统的消息
  91. [每条消息至少包含时间戳和主机名,通常还包含程序的名字,
  92. 但这依赖于日志守护进程的信任度设置。]</para>
  93. <indexterm zone="ch-system-sysklogd syslogd">
  94. <primary sortas="b-syslogd">syslogd</primary>
  95. </indexterm>
  96. </listitem>
  97. </varlistentry>
  98. </variablelist>
  99. </sect2>
  100. </sect1>