Browse Source

chapter06: Translate procps instruction

Xi Ruoyao 7 years ago
parent
commit
4916e2a137
1 changed files with 34 additions and 36 deletions
  1. 34 36
      chapter06/procps.xml

+ 34 - 36
chapter06/procps.xml

@@ -23,7 +23,7 @@
   <sect2 role="package">
     <title/>
 
-    <para>The Procps-ng package contains programs for monitoring processes.</para>
+    <para>Procps-ng 软件包包含监视进程的程序。</para>
 
     <segmentedlist>
       <segtitle>&buildtime;</segtitle>
@@ -63,8 +63,8 @@
       <varlistentry>
         <term><parameter>--disable-kill</parameter></term>
         <listitem>
-          <para>This switch disables building the <command>kill</command>
-          command that will be installed by the Util-linux package.</para>
+          <para>该选项禁用 <command>kill</command> 命令的构建,
+          Util-linux 软件包将安装它。</para>
         </listitem>
       </varlistentry>
     </variablelist>
@@ -73,25 +73,28 @@
 
 <screen><userinput remap="make">make</userinput></screen>
 
-    <para>The test suite needs some custom modifications for LFS.
+    <!--para>The test suite needs some custom modifications for LFS.
     Remove a test that fails when scripting does not use a tty device and
     fix two others.
-    To run the test suite, run the following commands:</para>
+    To run the test suite, run the following commands:</para-->
+    <para>在 LFS 系统上,测试套件需要一些自定义修改。
+		删除一个在没有使用 tty 设备输入时会失败的测试,并修正另外两个。
+		执行下列命令运行测试套件:</para>
 
 <screen><userinput remap="test">sed -i -r 's|(pmap_initname)\\\$|\1|' testsuite/pmap.test/pmap.exp
 sed -i '/set tty/d' testsuite/pkill.test/pkill.exp
 rm testsuite/pgrep.test/pgrep.exp
 make check</userinput></screen>
 
-    <para>One ps test may fail, but passes if the tests are rerun at 
-    the end of Chapter&nbsp;6.</para>
+    <para>一个 ps 测试可能失败,但在第 6 章的最后再重新运行即可通过。</para>
 
     <para>安装该软件包:</para>
 
 <screen><userinput remap="install">make install</userinput></screen>
 
-<para>Finally, move essential libraries to a location that can be found if
-<filename class="directory">/usr</filename> is not mounted.</para>
+<para>最后,将必要的库移动到
+	<filename class="directory">/usr</filename> 尚未挂载时也能访问的位置:
+</para>
 
 <screen><userinput remap="install">mv -v /usr/lib/libprocps.so.* /lib
 ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</userinput></screen>
@@ -108,9 +111,9 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
 
       <seglistitem>
         <seg>free, pgrep, pidof, pkill, pmap, ps, pwdx, slabtop,
-        sysctl, tload, top, uptime, vmstat, w, and watch</seg>
+        sysctl, tload, top, uptime, vmstat, w, 以及 watch</seg>
         <seg>libprocps.so</seg>
-        <seg>/usr/include/proc and /usr/share/doc/procps-ng-&procps-ng-version;</seg>
+        <seg>/usr/include/proc  /usr/share/doc/procps-ng-&procps-ng-version;</seg>
       </seglistitem>
     </segmentedlist>
 
@@ -122,8 +125,8 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="free">
         <term><command>free</command></term>
         <listitem>
-          <para>Reports the amount of free and used memory (both physical and
-          swap memory) in the system</para>
+          <para>报告系统中可用和已用内存(包括物理内存和交换空间)
+          	  的容量</para>
           <indexterm zone="ch-system-procps free">
             <primary sortas="b-free">free</primary>
           </indexterm>
@@ -133,7 +136,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="pgrep">
         <term><command>pgrep</command></term>
         <listitem>
-          <para>Looks up processes based on their name and other attributes</para>
+          <para>根据名称和其他属性查找进程</para>
           <indexterm zone="ch-system-procps pgrep">
             <primary sortas="b-pgrep">pgrep</primary>
           </indexterm>
@@ -143,7 +146,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="pidof">
         <term><command>pidof</command></term>
         <listitem>
-          <para>Reports the PIDs of the given programs</para>
+          <para>报告给定程序的 PID</para>
           <indexterm zone="ch-system-procps pidof">
             <primary sortas="b-pidof">pidof</primary>
           </indexterm>
@@ -153,7 +156,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="pkill">
         <term><command>pkill</command></term>
         <listitem>
-          <para>Signals processes based on their name and other attributes</para>
+          <para>根据名称和其他属性向进程发送信号</para>
           <indexterm zone="ch-system-procps pkill">
             <primary sortas="b-pkill">pkill</primary>
           </indexterm>
@@ -163,7 +166,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="pmap">
         <term><command>pmap</command></term>
         <listitem>
-          <para>Reports the memory map of the given process</para>
+          <para>报告给定进程的内存映射</para>
           <indexterm zone="ch-system-procps pmap">
             <primary sortas="b-pmap">pmap</primary>
           </indexterm>
@@ -173,7 +176,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="ps">
         <term><command>ps</command></term>
         <listitem>
-          <para>Lists the current running processes</para>
+          <para>列出正在运行的进程</para>
           <indexterm zone="ch-system-procps ps">
             <primary sortas="b-ps">ps</primary>
           </indexterm>
@@ -183,7 +186,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="pwdx">
         <term><command>pwdx</command></term>
         <listitem>
-          <para>Reports the current working directory of a process</para>
+          <para>报告一个进程的当前工作目录</para>
           <indexterm zone="ch-system-procps pwdx">
             <primary sortas="b-pwdx">pwdx</primary>
           </indexterm>
@@ -193,7 +196,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="slabtop">
         <term><command>slabtop</command></term>
         <listitem>
-          <para>Displays detailed kernel slab cache information in real time</para>
+          <para>实时显示内核 slab 缓存详细信息</para>
           <indexterm zone="ch-system-procps slabtop">
             <primary sortas="b-slabtop">slabtop</primary>
           </indexterm>
@@ -203,7 +206,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="sysctl">
         <term><command>sysctl</command></term>
         <listitem>
-          <para>Modifies kernel parameters at run time</para>
+          <para>在运行时修改内核参数</para>
           <indexterm zone="ch-system-procps sysctl">
             <primary sortas="b-sysctl">sysctl</primary>
           </indexterm>
@@ -213,7 +216,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="tload">
         <term><command>tload</command></term>
         <listitem>
-          <para>Prints a graph of the current system load average</para>
+          <para>打印当前系统平均负载示意图</para>
           <indexterm zone="ch-system-procps tload">
             <primary sortas="b-tload">tload</primary>
           </indexterm>
@@ -223,8 +226,8 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="top">
         <term><command>top</command></term>
         <listitem>
-          <para>Displays a list of the most CPU intensive processes; it
-          provides an ongoing look at processor activity in real time</para>
+          <para>列出 CPU 占用最大的进程列表;
+          	  它实时地提供处理器活动的连续概况</para>
           <indexterm zone="ch-system-procps top">
             <primary sortas="b-top">top</primary>
           </indexterm>
@@ -234,8 +237,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="uptime">
         <term><command>uptime</command></term>
         <listitem>
-          <para>Reports how long the system has been running, how many users are
-          logged on, and the system load averages</para>
+          <para>报告系统运行时间、登录用户数目和系统平均负载</para>
           <indexterm zone="ch-system-procps uptime">
             <primary sortas="b-uptime">uptime</primary>
           </indexterm>
@@ -245,9 +247,8 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="vmstat">
         <term><command>vmstat</command></term>
         <listitem>
-          <para>Reports virtual memory statistics, giving information about
-          processes, memory, paging, block Input/Output (IO), traps, and CPU
-          activity</para>
+          <para>报告虚拟内存统计,给出进程、内存、分页、块输入输出(IO)、
+          陷阱和 CPU 活动信息</para>
           <indexterm zone="ch-system-procps vmstat">
             <primary sortas="b-vmstat">vmstat</primary>
           </indexterm>
@@ -257,8 +258,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="w">
         <term><command>w</command></term>
         <listitem>
-          <para>Shows which users are currently logged on, where, and since
-          when</para>
+          <para>显示当前登录用户和它们的登录地点、时间</para>
           <indexterm zone="ch-system-procps w">
             <primary sortas="b-w">w</primary>
           </indexterm>
@@ -268,9 +268,8 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="watch">
         <term><command>watch</command></term>
         <listitem>
-          <para>Runs a given command repeatedly, displaying the first
-          screen-full of its output; this allows a user to watch the output
-          change over time</para>
+          <para>重复执行给定命令,显示其输出的第一页;
+          这使得用户可以观察输出随时间的变化</para>
           <indexterm zone="ch-system-procps watch">
             <primary sortas="b-watch">watch</primary>
           </indexterm>
@@ -280,8 +279,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</useri
       <varlistentry id="libprocps">
         <term><filename class="libraryfile">libprocps</filename></term>
         <listitem>
-          <para>Contains the functions used by most programs in this
-          package</para>
+          <para>包含该软件包大多数程序使用的函数</para>
           <indexterm zone="ch-system-procps libprocps">
             <primary sortas="c-libprocps">libprocps</primary>
           </indexterm>