Fix an md5sum
[linux_from_scratch.git] / chapter06 / procps.xml
blobe4b1909fc367e4bae9765d605b5788ae4e761bb8
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 ]>
8 <sect1 id="ch-system-procps" role="wrap">
9   <?dbhtml filename="procps-ng.html"?>
11   <sect1info condition="script">
12     <productname>procps-ng</productname>
13     <productnumber>&procps-ng-version;</productnumber>
14     <address>&procps-ng-url;</address>
15   </sect1info>
17   <title>Procps-ng-&procps-ng-version;</title>
19   <indexterm zone="ch-system-procps">
20     <primary sortas="a-Procps">Procps-ng</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The Procps-ng package contains programs for monitoring processes.</para>
28     <segmentedlist>
29       <segtitle>&buildtime;</segtitle>
30       <segtitle>&diskspace;</segtitle>
32       <seglistitem>
33         <seg>&procps-ng-ch6-sbu;</seg>
34         <seg>&procps-ng-ch6-du;</seg>
35       </seglistitem>
36     </segmentedlist>
38   </sect2>
40   <sect2 role="installation">
41     <title>Installation of Procps-ng</title>
43     <para>Now prepare procps-ng for compilation:</para>
45 <screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr                            \
46             --exec-prefix=                           \
47             --libdir=/usr/lib                        \
48             --docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
49             --disable-static                         \
50             --disable-kill</userinput></screen>
52 <screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr                            \
53             --exec-prefix=                           \
54             --libdir=/usr/lib                        \
55             --docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
56             --disable-static                         \
57             --disable-kill                           \
58             --with-systemd</userinput></screen>
60     <variablelist>
61       <title>The meaning of the configure options:</title>
63       <varlistentry>
64         <term><parameter>--disable-kill</parameter></term>
65         <listitem>
66           <para>This switch disables building the <command>kill</command>
67           command that will be installed by the Util-linux package.</para>
68         </listitem>
69       </varlistentry>
70     </variablelist>
72     <para>Compile the package:</para>
74 <screen><userinput remap="make">make</userinput></screen>
76     <para>The test suite needs some custom modifications for LFS.
77     Remove the test that fails when scripting does not use a tty device.
78     To run the test suite, run the following commands:</para>
80 <screen><userinput remap="test">sed -i -r 's|(pmap_initname)\\\$|\1|' testsuite/pmap.test/pmap.exp
81 make check</userinput></screen>
83     <para>Install the package:</para>
85 <screen><userinput remap="install">make install</userinput></screen>
87 <para>Finally, move essential libraries to a location that can be found if
88 <filename class="directory">/usr</filename> is not mounted.</para>
90 <screen><userinput remap="install">mv -v /usr/lib/libprocps.so.* /lib
91 ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</userinput></screen>
93   </sect2>
95   <sect2 id="contents-procps" role="content">
96     <title>Contents of Procps-ng</title>
98     <segmentedlist>
99       <segtitle>Installed programs</segtitle>
100       <segtitle>Installed library</segtitle>
101       <segtitle>Installed directories</segtitle>
103       <seglistitem>
104         <seg>free, pgrep, pidof, pkill, pmap, ps, pwdx, slabtop,
105         sysctl, tload, top, uptime, vmstat, w, and watch</seg>
106         <seg>libprocps.so</seg>
107         <seg>/usr/include/proc and /usr/share/doc/procps-ng-&procps-ng-version;</seg>
108       </seglistitem>
109     </segmentedlist>
111     <variablelist>
112       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
113       <?dbfo list-presentation="list"?>
114       <?dbhtml list-presentation="table"?>
116       <varlistentry id="free">
117         <term><command>free</command></term>
118         <listitem>
119           <para>Reports the amount of free and used memory (both physical and
120           swap memory) in the system</para>
121           <indexterm zone="ch-system-procps free">
122             <primary sortas="b-free">free</primary>
123           </indexterm>
124         </listitem>
125       </varlistentry>
127       <varlistentry id="pgrep">
128         <term><command>pgrep</command></term>
129         <listitem>
130           <para>Looks up processes based on their name and other attributes</para>
131           <indexterm zone="ch-system-procps pgrep">
132             <primary sortas="b-pgrep">pgrep</primary>
133           </indexterm>
134         </listitem>
135       </varlistentry>
137       <varlistentry id="pidof">
138         <term><command>pidof</command></term>
139         <listitem>
140           <para>Reports the PIDs of the given programs</para>
141           <indexterm zone="ch-system-procps pidof">
142             <primary sortas="b-pidof">pidof</primary>
143           </indexterm>
144         </listitem>
145       </varlistentry>
147       <varlistentry id="pkill">
148         <term><command>pkill</command></term>
149         <listitem>
150           <para>Signals processes based on their name and other attributes</para>
151           <indexterm zone="ch-system-procps pkill">
152             <primary sortas="b-pkill">pkill</primary>
153           </indexterm>
154         </listitem>
155       </varlistentry>
157       <varlistentry id="pmap">
158         <term><command>pmap</command></term>
159         <listitem>
160           <para>Reports the memory map of the given process</para>
161           <indexterm zone="ch-system-procps pmap">
162             <primary sortas="b-pmap">pmap</primary>
163           </indexterm>
164         </listitem>
165       </varlistentry>
167       <varlistentry id="ps">
168         <term><command>ps</command></term>
169         <listitem>
170           <para>Lists the current running processes</para>
171           <indexterm zone="ch-system-procps ps">
172             <primary sortas="b-ps">ps</primary>
173           </indexterm>
174         </listitem>
175       </varlistentry>
177       <varlistentry id="pwdx">
178         <term><command>pwdx</command></term>
179         <listitem>
180           <para>Reports the current working directory of a process</para>
181           <indexterm zone="ch-system-procps pwdx">
182             <primary sortas="b-pwdx">pwdx</primary>
183           </indexterm>
184         </listitem>
185       </varlistentry>
187       <varlistentry id="slabtop">
188         <term><command>slabtop</command></term>
189         <listitem>
190           <para>Displays detailed kernel slap cache information in real time</para>
191           <indexterm zone="ch-system-procps slabtop">
192             <primary sortas="b-slabtop">slabtop</primary>
193           </indexterm>
194         </listitem>
195       </varlistentry>
197       <varlistentry id="sysctl">
198         <term><command>sysctl</command></term>
199         <listitem>
200           <para>Modifies kernel parameters at run time</para>
201           <indexterm zone="ch-system-procps sysctl">
202             <primary sortas="b-sysctl">sysctl</primary>
203           </indexterm>
204         </listitem>
205       </varlistentry>
207       <varlistentry id="tload">
208         <term><command>tload</command></term>
209         <listitem>
210           <para>Prints a graph of the current system load average</para>
211           <indexterm zone="ch-system-procps tload">
212             <primary sortas="b-tload">tload</primary>
213           </indexterm>
214         </listitem>
215       </varlistentry>
217       <varlistentry id="top">
218         <term><command>top</command></term>
219         <listitem>
220           <para>Displays a list of the most CPU intensive processes; it
221           provides an ongoing look at processor activity in real time</para>
222           <indexterm zone="ch-system-procps top">
223             <primary sortas="b-top">top</primary>
224           </indexterm>
225         </listitem>
226       </varlistentry>
228       <varlistentry id="uptime">
229         <term><command>uptime</command></term>
230         <listitem>
231           <para>Reports how long the system has been running, how many users are
232           logged on, and the system load averages</para>
233           <indexterm zone="ch-system-procps uptime">
234             <primary sortas="b-uptime">uptime</primary>
235           </indexterm>
236         </listitem>
237       </varlistentry>
239       <varlistentry id="vmstat">
240         <term><command>vmstat</command></term>
241         <listitem>
242           <para>Reports virtual memory statistics, giving information about
243           processes, memory, paging, block Input/Output (IO), traps, and CPU
244           activity</para>
245           <indexterm zone="ch-system-procps vmstat">
246             <primary sortas="b-vmstat">vmstat</primary>
247           </indexterm>
248         </listitem>
249       </varlistentry>
251       <varlistentry id="w">
252         <term><command>w</command></term>
253         <listitem>
254           <para>Shows which users are currently logged on, where, and since
255           when</para>
256           <indexterm zone="ch-system-procps w">
257             <primary sortas="b-w">w</primary>
258           </indexterm>
259         </listitem>
260       </varlistentry>
262       <varlistentry id="watch">
263         <term><command>watch</command></term>
264         <listitem>
265           <para>Runs a given command repeatedly, displaying the first
266           screen-full of its output; this allows a user to watch the output
267           change over time</para>
268           <indexterm zone="ch-system-procps watch">
269             <primary sortas="b-watch">watch</primary>
270           </indexterm>
271         </listitem>
272       </varlistentry>
274       <varlistentry id="libprocps">
275         <term><filename class="libraryfile">libprocps</filename></term>
276         <listitem>
277           <para>Contains the functions used by most programs in this
278           package</para>
279           <indexterm zone="ch-system-procps libprocps">
280             <primary sortas="c-libprocps">libprocps</primary>
281           </indexterm>
282         </listitem>
283       </varlistentry>
285     </variablelist>
287   </sect2>
289 </sect1>