[f384a9d] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[f384a9d] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[155d664f] | 7 | <!ENTITY sysstat-download-http "http://perso.wanadoo.fr/sebastien.godard/sysstat-&sysstat-version;.tar.bz2">
|
---|
| 8 | <!ENTITY sysstat-download-ftp "ftp://ibiblio.org/pub/linux/system/status/sysstat-&sysstat-version;.tar.bz2">
|
---|
[5a195f0f] | 9 | <!ENTITY sysstat-md5sum "8352760480604419cdca748cd2e28d57">
|
---|
| 10 | <!ENTITY sysstat-size "181 KB">
|
---|
| 11 | <!ENTITY sysstat-buildsize "3 MB">
|
---|
[5ba48e8] | 12 | <!ENTITY sysstat-time "less than 0.1 SBU">
|
---|
[f384a9d] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="sysstat" xreflabel="Sysstat-&sysstat-version;">
|
---|
[eb2cf83a] | 16 | <?dbhtml filename="sysstat.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>Sysstat-&sysstat-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="sysstat">
|
---|
| 26 | <primary sortas="a-Sysstat">Sysstat</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to Sysstat</title>
|
---|
| 31 |
|
---|
[481b3e8] | 32 | <para>The <application>Sysstat</application> package contains utilities
|
---|
| 33 | to monitor system performance and usage activity.
|
---|
| 34 | <application>Sysstat</application> contains the <command>sar</command>
|
---|
| 35 | utility, common to many commercial Unixes, and tools you can schedule via
|
---|
[eb2cf83a] | 36 | cron to collect and historize performance and activity data.</para>
|
---|
| 37 |
|
---|
| 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>Download (HTTP): <ulink url="&sysstat-download-http;"/></para>
|
---|
| 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (FTP): <ulink url="&sysstat-download-ftp;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download MD5 sum: &sysstat-md5sum;</para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download size: &sysstat-size;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Estimated disk space required: &sysstat-buildsize;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated build time: &sysstat-time;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | </itemizedlist>
|
---|
| 59 |
|
---|
| 60 | <bridgehead renderas="sect3">Sysstat Dependencies</bridgehead>
|
---|
| 61 |
|
---|
| 62 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[56762b82] | 63 | <para role="recommended"><xref linkend="fcron"/></para>
|
---|
[eb2cf83a] | 64 |
|
---|
[1039de3] | 65 | <para condition="html" role="usernotes">User Notes:
|
---|
| 66 | <ulink url="&blfs-wiki;/sysstat"/></para>
|
---|
| 67 |
|
---|
[eb2cf83a] | 68 | </sect2>
|
---|
| 69 |
|
---|
| 70 | <sect2 role="installation">
|
---|
| 71 | <title>Installation of Sysstat</title>
|
---|
| 72 |
|
---|
[481b3e8] | 73 | <para>Install <application>Sysstat</application> by running the
|
---|
[eb2cf83a] | 74 | following commands:</para>
|
---|
| 75 |
|
---|
[5a195f0f] | 76 | <!-- <screen><userinput>make config &&
|
---|
| 77 | make</userinput></screen> -->
|
---|
| 78 |
|
---|
| 79 | <screen><userinput>sa_lib_dir=/usr/lib/sa \
|
---|
| 80 | sa_dir=/var/log/sa \
|
---|
| 81 | conf_dir=/etc/sysconfig \
|
---|
| 82 | ./configure --prefix=/usr \
|
---|
| 83 | --disable-man-group &&
|
---|
[eb2cf83a] | 84 | make</userinput></screen>
|
---|
| 85 |
|
---|
[5ba48e8] | 86 | <para>This package does not come with a test suite.</para>
|
---|
| 87 |
|
---|
[eb2cf83a] | 88 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 89 |
|
---|
[58a8fab2] | 90 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 91 |
|
---|
| 92 | <!-- install -v -m644 sysstat.sysconfig /etc/sysconfig/sysstat</userinput></screen> -->
|
---|
[eb2cf83a] | 93 |
|
---|
| 94 | </sect2>
|
---|
| 95 |
|
---|
| 96 | <sect2 role="commands">
|
---|
| 97 | <title>Command Explanations</title>
|
---|
| 98 |
|
---|
[5a195f0f] | 99 | <!-- <para><command>make config</command>: Runs the interactive configuration
|
---|
[481b3e8] | 100 | process. The first question prompts you for an
|
---|
| 101 | <quote><computeroutput>Installation directory</computeroutput></quote>.
|
---|
[5ba48e8] | 102 | Reply with <filename class="directory">/usr</filename>, as this is
|
---|
| 103 | equivalent to <application>Autoconf</application>'s
|
---|
[5a195f0f] | 104 | <option>-prefix=/usr</option> parameter to <command>configure</command>.
|
---|
[5ba48e8] | 105 | For all other prompts, you may press <keycap>Enter</keycap> to accept the
|
---|
| 106 | (very sane) defaults. When prompted for <quote><computeroutput>Number of
|
---|
| 107 | daily data files to keep: [7]</computeroutput></quote>, you may wish to
|
---|
[5a195f0f] | 108 | keep a larger number of files.</para> -->
|
---|
| 109 |
|
---|
| 110 | <para><envar>sa_lib_dir</envar>: This environment variable specifies the
|
---|
| 111 | location of the package-specific library directory.</para>
|
---|
| 112 |
|
---|
| 113 | <para><envar>sa_dir</envar>: This environment variable specifies the
|
---|
| 114 | location of the directory containing the data files.</para>
|
---|
| 115 |
|
---|
| 116 | <para><envar>conf_dir</envar>: This environment variable specifies the
|
---|
| 117 | location of the system configuration directory.</para>
|
---|
| 118 |
|
---|
| 119 | <para><parameter>--disable-man-group</parameter>: This parameter causes
|
---|
| 120 | the installation to ignore the man group variable resulting in the man
|
---|
| 121 | files having
|
---|
| 122 | <systemitem class="username">root</systemitem>:<systemitem class="groupname">root</systemitem>
|
---|
| 123 | ownership.</para>
|
---|
| 124 |
|
---|
| 125 | <para>Run <command>./configure --help</command> to see other influential
|
---|
| 126 | environment variables you can pass to <command>configure</command>. You may
|
---|
| 127 | want to use the <envar>history</envar> and <envar>compressafter</envar>
|
---|
| 128 | variables to customize the amount of data files kept on the system.</para>
|
---|
[eb2cf83a] | 129 |
|
---|
| 130 | </sect2>
|
---|
| 131 |
|
---|
| 132 | <sect2 role="configuration">
|
---|
| 133 | <title>Configuring Sysstat</title>
|
---|
| 134 |
|
---|
| 135 | <sect3>
|
---|
| 136 | <title>Cron Information</title>
|
---|
| 137 |
|
---|
[481b3e8] | 138 | <para>To begin gathering <application>Sysstat</application> history
|
---|
| 139 | information, you must add to, or create a privileged user's crontab. The
|
---|
[5a195f0f] | 140 | history data location is
|
---|
[481b3e8] | 141 | <filename class="directory">/var/log/sa</filename>. The user running
|
---|
| 142 | <application>Sysstat</application> utilities via cron must have write
|
---|
[eb2cf83a] | 143 | access to this location.</para>
|
---|
| 144 |
|
---|
| 145 | <para>Below is an example of what to install in the crontab. Adjust the
|
---|
| 146 | parameters to suit your needs. Use <command>man sa1</command> and
|
---|
| 147 | <command>man sa2</command> for information about the commands.</para>
|
---|
| 148 |
|
---|
| 149 | <screen><literal># 8am-7pm activity reports every 10 minutes during weekdays
|
---|
[f384a9d] | 150 | 0 8-18 * * 1-5 /usr/lib/sa/sa1 600 6 &
|
---|
[481b3e8] | 151 |
|
---|
[f384a9d] | 152 | # 7pm-8am activity reports every hour during weekdays
|
---|
| 153 | 0 19-7 * * 1-5 /usr/lib/sa/sa1 &
|
---|
[481b3e8] | 154 |
|
---|
[f384a9d] | 155 | # Activity reports every hour on Saturday and Sunday
|
---|
| 156 | 0 * * * 0,6 /usr/lib/sa/sa1 &
|
---|
[481b3e8] | 157 |
|
---|
[f384a9d] | 158 | # Daily summary prepared at 19:05
|
---|
[eb2cf83a] | 159 | 5 19 * * * /usr/lib/sa/sa2 -A &</literal></screen>
|
---|
| 160 |
|
---|
| 161 | <para>Ensure you submit the revised crontab to the cron daemon.</para>
|
---|
| 162 |
|
---|
| 163 | </sect3>
|
---|
| 164 |
|
---|
| 165 | <sect3 id="sysstat-init">
|
---|
| 166 | <title>System Startup Information</title>
|
---|
| 167 |
|
---|
| 168 | <indexterm zone="sysstat sysstat-init">
|
---|
| 169 | <primary sortas="f-sysstat">sysstat</primary>
|
---|
| 170 | </indexterm>
|
---|
| 171 |
|
---|
[5ba48e8] | 172 | <para>At system startup, a LINUX RESTART message must be inserted in the
|
---|
| 173 | daily data file to reinitialize the kernel counters. This can be
|
---|
| 174 | automated by installing the <filename>/etc/rc.d/init.d/sysstat</filename>
|
---|
[5254d12] | 175 | init script included in the <xref linkend="bootscripts"/>
|
---|
[bccbdaea] | 176 | package using the following command as the
|
---|
[5ba48e8] | 177 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[eb2cf83a] | 178 |
|
---|
| 179 | <screen role="root"><userinput>make install-sysstat</userinput></screen>
|
---|
| 180 |
|
---|
| 181 | </sect3>
|
---|
| 182 |
|
---|
| 183 | </sect2>
|
---|
| 184 |
|
---|
| 185 | <sect2 role="content">
|
---|
| 186 | <title>Contents</title>
|
---|
| 187 |
|
---|
| 188 | <segmentedlist>
|
---|
| 189 | <segtitle>Installed Programs</segtitle>
|
---|
| 190 | <segtitle>Installed Libraries</segtitle>
|
---|
| 191 | <segtitle>Installed Directories</segtitle>
|
---|
| 192 |
|
---|
| 193 | <seglistitem>
|
---|
[5a195f0f] | 194 | <seg>iostat, mpstat, pidstat, sar, sa1, sa2, sadc and sadf</seg>
|
---|
[eb2cf83a] | 195 | <seg>None</seg>
|
---|
[bccbdaea] | 196 | <seg>/usr/lib/sa, /usr/share/doc/sysstat-&sysstat-version; and
|
---|
[5ba48e8] | 197 | /var/log/sa</seg>
|
---|
[eb2cf83a] | 198 | </seglistitem>
|
---|
| 199 | </segmentedlist>
|
---|
| 200 |
|
---|
| 201 | <variablelist>
|
---|
| 202 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 203 | <?dbfo list-presentation="list"?>
|
---|
| 204 | <?dbhtml list-presentation="table"?>
|
---|
| 205 |
|
---|
| 206 | <varlistentry id="iostat">
|
---|
| 207 | <term><command>iostat</command></term>
|
---|
| 208 | <listitem>
|
---|
[481b3e8] | 209 | <para>reports CPU statistics and input/output
|
---|
[eb2cf83a] | 210 | statistics for devices and partitions.</para>
|
---|
| 211 | <indexterm zone="sysstat iostat">
|
---|
| 212 | <primary sortas="b-iostat">iostat</primary>
|
---|
| 213 | </indexterm>
|
---|
| 214 | </listitem>
|
---|
| 215 | </varlistentry>
|
---|
| 216 |
|
---|
| 217 | <varlistentry id="mpstat">
|
---|
| 218 | <term><command>mpstat</command></term>
|
---|
| 219 | <listitem>
|
---|
[bccbdaea] | 220 | <para>reports individual or combined processor related
|
---|
[5ba48e8] | 221 | statistics.</para>
|
---|
[eb2cf83a] | 222 | <indexterm zone="sysstat mpstat">
|
---|
| 223 | <primary sortas="b-mpstat">mpstat</primary>
|
---|
| 224 | </indexterm>
|
---|
| 225 | </listitem>
|
---|
| 226 | </varlistentry>
|
---|
| 227 |
|
---|
[5a195f0f] | 228 | <varlistentry id="pidstat">
|
---|
| 229 | <term><command>pidstat</command></term>
|
---|
| 230 | <listitem>
|
---|
| 231 | <para>is used for monitoring individual tasks currently being managed
|
---|
| 232 | by the Linux kernel.</para>
|
---|
| 233 | <indexterm zone="sysstat pidstat">
|
---|
| 234 | <primary sortas="b-pidstat">pidstat</primary>
|
---|
| 235 | </indexterm>
|
---|
| 236 | </listitem>
|
---|
| 237 | </varlistentry>
|
---|
| 238 |
|
---|
[eb2cf83a] | 239 | <varlistentry id="sar">
|
---|
| 240 | <term><command>sar</command></term>
|
---|
| 241 | <listitem>
|
---|
[bccbdaea] | 242 | <para> collects, reports and saves system activity
|
---|
[5ba48e8] | 243 | information.</para>
|
---|
[eb2cf83a] | 244 | <indexterm zone="sysstat sar">
|
---|
| 245 | <primary sortas="b-sar">sar</primary>
|
---|
| 246 | </indexterm>
|
---|
| 247 | </listitem>
|
---|
| 248 | </varlistentry>
|
---|
| 249 |
|
---|
| 250 | <varlistentry id="sa1">
|
---|
| 251 | <term><command>sa1</command></term>
|
---|
| 252 | <listitem>
|
---|
[481b3e8] | 253 | <para>collects and stores binary data in the system activity daily
|
---|
[5ba48e8] | 254 | data file. It is a front end to <filename>sadc</filename> designed
|
---|
| 255 | to be run from cron.</para>
|
---|
[eb2cf83a] | 256 | <indexterm zone="sysstat sa1">
|
---|
| 257 | <primary sortas="b-sa1">sa1</primary>
|
---|
| 258 | </indexterm>
|
---|
| 259 | </listitem>
|
---|
| 260 | </varlistentry>
|
---|
| 261 |
|
---|
| 262 | <varlistentry id="sa2">
|
---|
| 263 | <term><command>sa2</command></term>
|
---|
| 264 | <listitem>
|
---|
[481b3e8] | 265 | <para>writes a summarized daily activity report. It is a front end
|
---|
[eb2cf83a] | 266 | to <command>sar</command> designed to be run from cron.</para>
|
---|
| 267 | <indexterm zone="sysstat sa2">
|
---|
| 268 | <primary sortas="b-sa2">sa2</primary>
|
---|
| 269 | </indexterm>
|
---|
| 270 | </listitem>
|
---|
| 271 | </varlistentry>
|
---|
| 272 |
|
---|
| 273 | <varlistentry id="sadc">
|
---|
| 274 | <term><command>sadc</command></term>
|
---|
| 275 | <listitem>
|
---|
[481b3e8] | 276 | <para>is the system activity data collector, used as a backend for
|
---|
[eb2cf83a] | 277 | <command>sar</command>.</para>
|
---|
| 278 | <indexterm zone="sysstat sadc">
|
---|
| 279 | <primary sortas="b-sadc">sadc</primary>
|
---|
| 280 | </indexterm>
|
---|
| 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
| 283 |
|
---|
[5ba48e8] | 284 | <varlistentry id="sadf">
|
---|
| 285 | <term><command>sadf</command></term>
|
---|
| 286 | <listitem>
|
---|
| 287 | <para>is used for displaying the contents of data files created by
|
---|
| 288 | the <command>sar</command> command. But unlike
|
---|
| 289 | <command>sar</command>, <command>sadf</command> can write its data
|
---|
| 290 | in many different formats.</para>
|
---|
| 291 | <indexterm zone="sysstat sadf">
|
---|
| 292 | <primary sortas="b-sadf">sadf</primary>
|
---|
| 293 | </indexterm>
|
---|
| 294 | </listitem>
|
---|
| 295 | </varlistentry>
|
---|
| 296 |
|
---|
[eb2cf83a] | 297 | </variablelist>
|
---|
| 298 |
|
---|
| 299 | </sect2>
|
---|
[f384a9d] | 300 |
|
---|
| 301 | </sect1>
|
---|