procps.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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-ng-&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 revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
  34. --exec-prefix= \
  35. --libdir=/usr/lib \
  36. --docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
  37. --disable-static \
  38. --disable-kill</userinput></screen>
  39. <screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
  40. --exec-prefix= \
  41. --libdir=/usr/lib \
  42. --docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
  43. --disable-static \
  44. --disable-kill \
  45. --with-systemd</userinput></screen>
  46. <variablelist>
  47. <title>The meaning of the configure options:</title>
  48. <varlistentry>
  49. <term><parameter>--disable-kill</parameter></term>
  50. <listitem>
  51. <para>This switch disables building the <command>kill</command>
  52. command that will be installed by the Util-linux package.</para>
  53. </listitem>
  54. </varlistentry>
  55. </variablelist>
  56. <para>Compile the package:</para>
  57. <screen><userinput remap="make">make</userinput></screen>
  58. <para>The test suite needs some custom modifications for LFS.
  59. Remove a test that fails when scripting does not use a tty device and
  60. fix two others.
  61. To run the test suite, run the following commands:</para>
  62. <screen><userinput remap="test">sed -i -r 's|(pmap_initname)\\\$|\1|' testsuite/pmap.test/pmap.exp
  63. sed -i '/set tty/d' testsuite/pkill.test/pkill.exp
  64. rm testsuite/pgrep.test/pgrep.exp
  65. make check</userinput></screen>
  66. <para>One ps test may fail, but passes if the tests are rerun at
  67. the end of Chapter 6.</para>
  68. <para>Install the package:</para>
  69. <screen><userinput remap="install">make install</userinput></screen>
  70. <para>Finally, move essential libraries to a location that can be found if
  71. <filename class="directory">/usr</filename> is not mounted.</para>
  72. <screen><userinput remap="install">mv -v /usr/lib/libprocps.so.* /lib
  73. ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</userinput></screen>
  74. </sect2>
  75. <sect2 id="contents-procps" role="content">
  76. <title>Contents of Procps-ng</title>
  77. <segmentedlist>
  78. <segtitle>Installed programs</segtitle>
  79. <segtitle>Installed library</segtitle>
  80. <segtitle>Installed directories</segtitle>
  81. <seglistitem>
  82. <seg>free, pgrep, pidof, pkill, pmap, ps, pwdx, slabtop,
  83. sysctl, tload, top, uptime, vmstat, w, and watch</seg>
  84. <seg>libprocps.so</seg>
  85. <seg>/usr/include/proc and /usr/share/doc/procps-ng-&procps-ng-version;</seg>
  86. </seglistitem>
  87. </segmentedlist>
  88. <variablelist>
  89. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  90. <?dbfo list-presentation="list"?>
  91. <?dbhtml list-presentation="table"?>
  92. <varlistentry id="free">
  93. <term><command>free</command></term>
  94. <listitem>
  95. <para>Reports the amount of free and used memory (both physical and
  96. swap memory) in the system</para>
  97. <indexterm zone="ch-system-procps free">
  98. <primary sortas="b-free">free</primary>
  99. </indexterm>
  100. </listitem>
  101. </varlistentry>
  102. <varlistentry id="pgrep">
  103. <term><command>pgrep</command></term>
  104. <listitem>
  105. <para>Looks up processes based on their name and other attributes</para>
  106. <indexterm zone="ch-system-procps pgrep">
  107. <primary sortas="b-pgrep">pgrep</primary>
  108. </indexterm>
  109. </listitem>
  110. </varlistentry>
  111. <varlistentry id="pidof">
  112. <term><command>pidof</command></term>
  113. <listitem>
  114. <para>Reports the PIDs of the given programs</para>
  115. <indexterm zone="ch-system-procps pidof">
  116. <primary sortas="b-pidof">pidof</primary>
  117. </indexterm>
  118. </listitem>
  119. </varlistentry>
  120. <varlistentry id="pkill">
  121. <term><command>pkill</command></term>
  122. <listitem>
  123. <para>Signals processes based on their name and other attributes</para>
  124. <indexterm zone="ch-system-procps pkill">
  125. <primary sortas="b-pkill">pkill</primary>
  126. </indexterm>
  127. </listitem>
  128. </varlistentry>
  129. <varlistentry id="pmap">
  130. <term><command>pmap</command></term>
  131. <listitem>
  132. <para>Reports the memory map of the given process</para>
  133. <indexterm zone="ch-system-procps pmap">
  134. <primary sortas="b-pmap">pmap</primary>
  135. </indexterm>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry id="ps">
  139. <term><command>ps</command></term>
  140. <listitem>
  141. <para>Lists the current running processes</para>
  142. <indexterm zone="ch-system-procps ps">
  143. <primary sortas="b-ps">ps</primary>
  144. </indexterm>
  145. </listitem>
  146. </varlistentry>
  147. <varlistentry id="pwdx">
  148. <term><command>pwdx</command></term>
  149. <listitem>
  150. <para>Reports the current working directory of a process</para>
  151. <indexterm zone="ch-system-procps pwdx">
  152. <primary sortas="b-pwdx">pwdx</primary>
  153. </indexterm>
  154. </listitem>
  155. </varlistentry>
  156. <varlistentry id="slabtop">
  157. <term><command>slabtop</command></term>
  158. <listitem>
  159. <para>Displays detailed kernel slap cache information in real time</para>
  160. <indexterm zone="ch-system-procps slabtop">
  161. <primary sortas="b-slabtop">slabtop</primary>
  162. </indexterm>
  163. </listitem>
  164. </varlistentry>
  165. <varlistentry id="sysctl">
  166. <term><command>sysctl</command></term>
  167. <listitem>
  168. <para>Modifies kernel parameters at run time</para>
  169. <indexterm zone="ch-system-procps sysctl">
  170. <primary sortas="b-sysctl">sysctl</primary>
  171. </indexterm>
  172. </listitem>
  173. </varlistentry>
  174. <varlistentry id="tload">
  175. <term><command>tload</command></term>
  176. <listitem>
  177. <para>Prints a graph of the current system load average</para>
  178. <indexterm zone="ch-system-procps tload">
  179. <primary sortas="b-tload">tload</primary>
  180. </indexterm>
  181. </listitem>
  182. </varlistentry>
  183. <varlistentry id="top">
  184. <term><command>top</command></term>
  185. <listitem>
  186. <para>Displays a list of the most CPU intensive processes; it
  187. provides an ongoing look at processor activity in real time</para>
  188. <indexterm zone="ch-system-procps top">
  189. <primary sortas="b-top">top</primary>
  190. </indexterm>
  191. </listitem>
  192. </varlistentry>
  193. <varlistentry id="uptime">
  194. <term><command>uptime</command></term>
  195. <listitem>
  196. <para>Reports how long the system has been running, how many users are
  197. logged on, and the system load averages</para>
  198. <indexterm zone="ch-system-procps uptime">
  199. <primary sortas="b-uptime">uptime</primary>
  200. </indexterm>
  201. </listitem>
  202. </varlistentry>
  203. <varlistentry id="vmstat">
  204. <term><command>vmstat</command></term>
  205. <listitem>
  206. <para>Reports virtual memory statistics, giving information about
  207. processes, memory, paging, block Input/Output (IO), traps, and CPU
  208. activity</para>
  209. <indexterm zone="ch-system-procps vmstat">
  210. <primary sortas="b-vmstat">vmstat</primary>
  211. </indexterm>
  212. </listitem>
  213. </varlistentry>
  214. <varlistentry id="w">
  215. <term><command>w</command></term>
  216. <listitem>
  217. <para>Shows which users are currently logged on, where, and since
  218. when</para>
  219. <indexterm zone="ch-system-procps w">
  220. <primary sortas="b-w">w</primary>
  221. </indexterm>
  222. </listitem>
  223. </varlistentry>
  224. <varlistentry id="watch">
  225. <term><command>watch</command></term>
  226. <listitem>
  227. <para>Runs a given command repeatedly, displaying the first
  228. screen-full of its output; this allows a user to watch the output
  229. change over time</para>
  230. <indexterm zone="ch-system-procps watch">
  231. <primary sortas="b-watch">watch</primary>
  232. </indexterm>
  233. </listitem>
  234. </varlistentry>
  235. <varlistentry id="libprocps">
  236. <term><filename class="libraryfile">libprocps</filename></term>
  237. <listitem>
  238. <para>Contains the functions used by most programs in this
  239. package</para>
  240. <indexterm zone="ch-system-procps libprocps">
  241. <primary sortas="c-libprocps">libprocps</primary>
  242. </indexterm>
  243. </listitem>
  244. </varlistentry>
  245. </variablelist>
  246. </sect2>
  247. </sect1>