procps.xml 9.1 KB

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