procps.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  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-procps" role="wrap">
  8. <?dbhtml filename="procps-ng.html"?>
  9. <sect1info condition="script">
  10. <productname>procps-ng</productname>
  11. <productnumber>&procps-ng-version;</productnumber>
  12. <address>&procps-ng-url;</address>
  13. </sect1info>
  14. <title>Procps-&procps-ng-version;</title>
  15. <indexterm zone="ch-system-procps">
  16. <primary sortas="a-Procps">Procps-ng</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Procps-ng package contains programs for monitoring processes.</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&procps-ng-ch6-sbu;</seg>
  26. <seg>&procps-ng-ch6-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>Installation of Procps-ng</title>
  32. <para>Now prepare procps-ng for compilation:</para>
  33. <screen><userinput remap="configure">./configure --prefix= \
  34. --mandir=/usr/share/man \
  35. --docdir=/usr/share/doc/$PROGRAM \
  36. --disable-skill \
  37. --disable-kill</userinput></screen>
  38. <variablelist>
  39. <title>The meaning of the configure options:</title>
  40. <varlistentry>
  41. <term><parameter>--disable-skill</parameter></term>
  42. <listitem>
  43. <para>This switch disables the obsolete and unportable
  44. skill and snice commands.</para>
  45. </listitem>
  46. </varlistentry>
  47. <varlistentry>
  48. <term><parameter>--disable-kill</parameter></term>
  49. <listitem>
  50. <para>This switch disables building the kill command that
  51. was installed in the util-linux package.</para>
  52. </listitem>
  53. </varlistentry>
  54. </variablelist>
  55. <para>Compile the package:</para>
  56. <screen><userinput remap="make">make</userinput></screen>
  57. <para>The test suite needs some custom modifications for LFS.
  58. The <command>which</command> is not available and the
  59. <command>pmap</command> test does not match a newline character in
  60. two tests. To run the test suite, run the following commands:</para>
  61. <screen><userinput remap="test">pushd testsuite
  62. sed -i 's|exec which sleep|exec echo /tools/bin/sleep|' config/unix.exp
  63. sed -i 's|pmap_initname\\\$|pmap_initname|' pmap.test/pmap.exp
  64. make site.exp
  65. DEJAGNU=global-conf.exp runtest
  66. popd</userinput></screen>
  67. <para>Install the package:</para>
  68. <screen><userinput remap="install">make install</userinput></screen>
  69. </sect2>
  70. <sect2 id="contents-procps" role="content">
  71. <title>Contents of Procps-ng</title>
  72. <segmentedlist>
  73. <segtitle>Installed programs</segtitle>
  74. <segtitle>Installed library</segtitle>
  75. <seglistitem>
  76. <seg>free, pgrep, pkill, pmap, ps, pwdx, slabtop,
  77. sysctl, tload, top, uptime, vmstat, w, and, watch</seg>
  78. <seg>libprocps.so</seg>
  79. </seglistitem>
  80. </segmentedlist>
  81. <variablelist>
  82. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  83. <?dbfo list-presentation="list"?>
  84. <?dbhtml list-presentation="table"?>
  85. <varlistentry id="free">
  86. <term><command>free</command></term>
  87. <listitem>
  88. <para>Reports the amount of free and used memory (both physical and
  89. swap memory) in the system</para>
  90. <indexterm zone="ch-system-procps free">
  91. <primary sortas="b-free">free</primary>
  92. </indexterm>
  93. </listitem>
  94. </varlistentry>
  95. <varlistentry id="pgrep">
  96. <term><command>pgrep</command></term>
  97. <listitem>
  98. <para>Looks up processes based on their name and other attributes</para>
  99. <indexterm zone="ch-system-procps pgrep">
  100. <primary sortas="b-pgrep">pgrep</primary>
  101. </indexterm>
  102. </listitem>
  103. </varlistentry>
  104. <varlistentry id="pkill">
  105. <term><command>pkill</command></term>
  106. <listitem>
  107. <para>Signals processes based on their name and other attributes</para>
  108. <indexterm zone="ch-system-procps pkill">
  109. <primary sortas="b-pkill">pkill</primary>
  110. </indexterm>
  111. </listitem>
  112. </varlistentry>
  113. <varlistentry id="pmap">
  114. <term><command>pmap</command></term>
  115. <listitem>
  116. <para>Reports the memory map of the given process</para>
  117. <indexterm zone="ch-system-procps pmap">
  118. <primary sortas="b-pmap">pmap</primary>
  119. </indexterm>
  120. </listitem>
  121. </varlistentry>
  122. <varlistentry id="ps">
  123. <term><command>ps</command></term>
  124. <listitem>
  125. <para>Lists the current running processes</para>
  126. <indexterm zone="ch-system-procps ps">
  127. <primary sortas="b-ps">ps</primary>
  128. </indexterm>
  129. </listitem>
  130. </varlistentry>
  131. <varlistentry id="pwdx">
  132. <term><command>pwdx</command></term>
  133. <listitem>
  134. <para>Reports the current working directory of a process</para>
  135. <indexterm zone="ch-system-procps pwdx">
  136. <primary sortas="b-pwdx">pwdx</primary>
  137. </indexterm>
  138. </listitem>
  139. </varlistentry>
  140. <varlistentry id="slabtop">
  141. <term><command>slabtop</command></term>
  142. <listitem>
  143. <para>Displays detailed kernel slap cache information in real time</para>
  144. <indexterm zone="ch-system-procps slabtop">
  145. <primary sortas="b-slabtop">slabtop</primary>
  146. </indexterm>
  147. </listitem>
  148. </varlistentry>
  149. <varlistentry id="sysctl">
  150. <term><command>sysctl</command></term>
  151. <listitem>
  152. <para>Modifies kernel parameters at run time</para>
  153. <indexterm zone="ch-system-procps sysctl">
  154. <primary sortas="b-sysctl">sysctl</primary>
  155. </indexterm>
  156. </listitem>
  157. </varlistentry>
  158. <varlistentry id="tload">
  159. <term><command>tload</command></term>
  160. <listitem>
  161. <para>Prints a graph of the current system load average</para>
  162. <indexterm zone="ch-system-procps tload">
  163. <primary sortas="b-tload">tload</primary>
  164. </indexterm>
  165. </listitem>
  166. </varlistentry>
  167. <varlistentry id="top">
  168. <term><command>top</command></term>
  169. <listitem>
  170. <para>Displays a list of the most CPU intensive processes; it
  171. provides an ongoing look at processor activity in real time</para>
  172. <indexterm zone="ch-system-procps top">
  173. <primary sortas="b-top">top</primary>
  174. </indexterm>
  175. </listitem>
  176. </varlistentry>
  177. <varlistentry id="uptime">
  178. <term><command>uptime</command></term>
  179. <listitem>
  180. <para>Reports how long the system has been running, how many users are
  181. logged on, and the system load averages</para>
  182. <indexterm zone="ch-system-procps uptime">
  183. <primary sortas="b-uptime">uptime</primary>
  184. </indexterm>
  185. </listitem>
  186. </varlistentry>
  187. <varlistentry id="vmstat">
  188. <term><command>vmstat</command></term>
  189. <listitem>
  190. <para>Reports virtual memory statistics, giving information about
  191. processes, memory, paging, block Input/Output (IO), traps, and CPU
  192. activity</para>
  193. <indexterm zone="ch-system-procps vmstat">
  194. <primary sortas="b-vmstat">vmstat</primary>
  195. </indexterm>
  196. </listitem>
  197. </varlistentry>
  198. <varlistentry id="w">
  199. <term><command>w</command></term>
  200. <listitem>
  201. <para>Shows which users are currently logged on, where, and since
  202. when</para>
  203. <indexterm zone="ch-system-procps w">
  204. <primary sortas="b-w">w</primary>
  205. </indexterm>
  206. </listitem>
  207. </varlistentry>
  208. <varlistentry id="watch">
  209. <term><command>watch</command></term>
  210. <listitem>
  211. <para>Runs a given command repeatedly, displaying the first
  212. screen-full of its output; this allows a user to watch the output
  213. change over time</para>
  214. <indexterm zone="ch-system-procps watch">
  215. <primary sortas="b-watch">watch</primary>
  216. </indexterm>
  217. </listitem>
  218. </varlistentry>
  219. <varlistentry id="libprocps">
  220. <term><filename class="libraryfile">libproc</filename></term>
  221. <listitem>
  222. <para>Contains the functions used by most programs in this
  223. package</para>
  224. <indexterm zone="ch-system-procps libprocps">
  225. <primary sortas="c-libprocps">libprocps</primary>
  226. </indexterm>
  227. </listitem>
  228. </varlistentry>
  229. </variablelist>
  230. </sect2>
  231. </sect1>