[f384a9d] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/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">
|
---|
| 9 | <!ENTITY sysstat-md5sum "075488cbb5979deec0ab05f3ca0c8d12">
|
---|
| 10 | <!ENTITY sysstat-size "118 KB">
|
---|
| 11 | <!ENTITY sysstat-buildsize "1.88 MB">
|
---|
| 12 | <!ENTITY sysstat-time "0.04 SBU">
|
---|
[f384a9d] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="sysstat" xreflabel="Sysstat-&sysstat-version;">
|
---|
[a0f03b0] | 16 | <sect1info>
|
---|
[5cd0959d] | 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
[a0f03b0] | 19 | </sect1info>
|
---|
[f384a9d] | 20 | <?dbhtml filename="sysstat.html"?>
|
---|
| 21 | <title>Sysstat-&sysstat-version;</title>
|
---|
[0015654c] | 22 | <indexterm zone="sysstat">
|
---|
| 23 | <primary sortas="a-Sysstat">Sysstat</primary></indexterm>
|
---|
[f384a9d] | 24 |
|
---|
| 25 | <sect2>
|
---|
| 26 | <title>Introduction to <application>Sysstat</application></title>
|
---|
| 27 |
|
---|
| 28 | <para>The <application>Sysstat</application> package contains utilities to
|
---|
| 29 | monitor system performance and usage activity.
|
---|
| 30 | <application>Sysstat</application> contains the <command>sar</command> utility,
|
---|
[1498ead] | 31 | common to many commercial Unixes, and tools you can schedule via cron to
|
---|
| 32 | collect and historize performance and activity data.</para>
|
---|
[f384a9d] | 33 |
|
---|
| 34 | <sect3><title>Package information</title>
|
---|
| 35 | <itemizedlist spacing='compact'>
|
---|
[0015654c] | 36 | <listitem><para>Download (HTTP):
|
---|
| 37 | <ulink url="&sysstat-download-http;"/></para></listitem>
|
---|
| 38 | <listitem><para>Download (FTP):
|
---|
| 39 | <ulink url="&sysstat-download-ftp;"/></para></listitem>
|
---|
[a31d341d] | 40 | <listitem><para>Download MD5 sum:
|
---|
| 41 | &sysstat-md5sum;</para></listitem>
|
---|
[0015654c] | 42 | <listitem><para>Download size:
|
---|
| 43 | &sysstat-size;</para></listitem>
|
---|
| 44 | <listitem><para>Estimated disk space required:
|
---|
| 45 | &sysstat-buildsize;</para></listitem>
|
---|
| 46 | <listitem><para>Estimated build time:
|
---|
| 47 | &sysstat-time;</para></listitem></itemizedlist>
|
---|
[f384a9d] | 48 | </sect3>
|
---|
| 49 |
|
---|
| 50 | <sect3><title><application>Sysstat</application> dependencies</title>
|
---|
| 51 | <sect4><title>Recommended</title>
|
---|
| 52 | <para><xref linkend="fcron"/></para></sect4>
|
---|
| 53 | </sect3>
|
---|
| 54 |
|
---|
| 55 | </sect2>
|
---|
| 56 |
|
---|
| 57 | <sect2>
|
---|
| 58 | <title>Installation of <application>Sysstat</application></title>
|
---|
| 59 |
|
---|
| 60 | <para>Install <application>Sysstat</application> by running the
|
---|
| 61 | following commands:</para>
|
---|
| 62 |
|
---|
| 63 | <screen><userinput><command>make config &&
|
---|
[0015654c] | 64 | make</command></userinput></screen>
|
---|
| 65 |
|
---|
| 66 | <para>Now, as the root user:</para>
|
---|
| 67 |
|
---|
| 68 | <screen><userinput role='root'><command>make install</command></userinput></screen>
|
---|
[f384a9d] | 69 |
|
---|
| 70 | </sect2>
|
---|
| 71 |
|
---|
| 72 | <sect2>
|
---|
| 73 | <title>Command explanations</title>
|
---|
| 74 |
|
---|
| 75 | <para><command>make config</command>: Runs the interactive configuration
|
---|
[155d664f] | 76 | process. The first question prompts you for an
|
---|
| 77 | <quote><computeroutput>Installation directory</computeroutput></quote>. Reply
|
---|
| 78 | with <filename class="directory">/usr</filename>, as
|
---|
| 79 | this is equivalent to <application>Autoconf</application>'s
|
---|
| 80 | <parameter>--prefix=/usr</parameter> parameter to
|
---|
| 81 | <command>configure</command>. For all other prompts, you may
|
---|
| 82 | press <command>Enter</command> to accept the (very sane) defaults. When
|
---|
| 83 | prompted for <quote><computeroutput>Number of daily data files to keep:
|
---|
| 84 | [7]</computeroutput></quote>, you may wish to keep a larger number of files.
|
---|
| 85 | However, don't exceed 25 because <application>Sysstat</application> will
|
---|
| 86 | resuse existing files the next month, leading to erroneous daily
|
---|
| 87 | reports.</para>
|
---|
[f384a9d] | 88 |
|
---|
| 89 | </sect2>
|
---|
| 90 |
|
---|
| 91 | <sect2>
|
---|
| 92 | <title>Configuring <application>Sysstat</application></title>
|
---|
| 93 |
|
---|
| 94 | <sect3><title>Cron information</title>
|
---|
| 95 |
|
---|
[1498ead] | 96 | <para>To begin gathering <application>Sysstat</application> history
|
---|
| 97 | information, you must add to, or create a privileged user's crontab. The
|
---|
| 98 | default history data location is
|
---|
| 99 | <filename class="directory">/var/log/sa</filename>. The user running
|
---|
| 100 | <application>Sysstat</application> utilities via cron must have write
|
---|
[f384a9d] | 101 | access to this location.</para>
|
---|
| 102 |
|
---|
| 103 | <para>Below is an example of what to install in the crontab. Adjust the
|
---|
| 104 | parameters to suit your needs. Use <command>man sa1</command> and
|
---|
| 105 | <command>man sa2</command> for information about the commands.</para>
|
---|
| 106 |
|
---|
| 107 | <screen><userinput># 8am-7pm activity reports every 10 minutes during weekdays
|
---|
| 108 | 0 8-18 * * 1-5 /usr/lib/sa/sa1 600 6 &
|
---|
| 109 |
|
---|
| 110 | # 7pm-8am activity reports every hour during weekdays
|
---|
| 111 | 0 19-7 * * 1-5 /usr/lib/sa/sa1 &
|
---|
| 112 |
|
---|
| 113 | # Activity reports every hour on Saturday and Sunday
|
---|
| 114 | 0 * * * 0,6 /usr/lib/sa/sa1 &
|
---|
| 115 |
|
---|
| 116 | # Daily summary prepared at 19:05
|
---|
| 117 | 5 19 * * * /usr/lib/sa/sa2 -A &</userinput></screen>
|
---|
| 118 |
|
---|
| 119 | <para>Ensure you submit the revised crontab to the cron daemon.</para>
|
---|
| 120 | </sect3>
|
---|
| 121 |
|
---|
[0015654c] | 122 | <sect3 id="sysstat-init"><title>System startup information</title>
|
---|
| 123 | <indexterm zone="sysstat sysstat-init">
|
---|
| 124 | <primary sortas="f-sysstat">sysstat</primary></indexterm>
|
---|
[f384a9d] | 125 |
|
---|
| 126 | <para>At system startup, a LINUX RESTART message must be inserted in the daily
|
---|
[02912d44] | 127 | data file to reinitialize the kernel counters. This can be automated by
|
---|
| 128 | installing the <filename>/etc/rc.d/init.d/sysstat</filename> init script
|
---|
| 129 | included in the <xref linkend="intro-important-bootscripts"/> package using
|
---|
| 130 | the following command:</para>
|
---|
[0015654c] | 131 |
|
---|
| 132 | <screen><userinput role='root'><command>make install-sysstat</command></userinput></screen>
|
---|
[f384a9d] | 133 | </sect3>
|
---|
| 134 |
|
---|
| 135 | </sect2>
|
---|
| 136 |
|
---|
| 137 | <sect2>
|
---|
| 138 | <title>Contents</title>
|
---|
| 139 |
|
---|
[0015654c] | 140 | <segmentedlist>
|
---|
| 141 | <segtitle>Installed Programs</segtitle>
|
---|
| 142 | <segtitle>Installed Libraries</segtitle>
|
---|
| 143 | <segtitle>Installed Directories</segtitle>
|
---|
| 144 |
|
---|
| 145 | <seglistitem>
|
---|
| 146 | <seg>iostat, mpstat, sar, sa1, sa2 and sadc</seg>
|
---|
| 147 | <seg>None</seg>
|
---|
| 148 | <seg>/usr/lib/sa and /var/log/sa</seg>
|
---|
| 149 | </seglistitem>
|
---|
| 150 | </segmentedlist>
|
---|
| 151 |
|
---|
| 152 | <variablelist>
|
---|
| 153 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 154 | <?dbfo list-presentation="list"?>
|
---|
| 155 |
|
---|
| 156 | <varlistentry id="iostat">
|
---|
| 157 | <term><command>iostat</command></term>
|
---|
| 158 | <listitem><para>reports <acronym>CPU</acronym> statistics and input/output
|
---|
| 159 | statistics for devices and partitions.</para>
|
---|
| 160 | <indexterm zone="sysstat iostat">
|
---|
| 161 | <primary sortas="b-iostat">iostat</primary>
|
---|
| 162 | </indexterm></listitem>
|
---|
| 163 | </varlistentry>
|
---|
| 164 |
|
---|
| 165 | <varlistentry id="mpstat">
|
---|
| 166 | <term><command>mpstat</command></term>
|
---|
| 167 | <listitem><para>reports individual or combined processor related
|
---|
| 168 | statistics.</para>
|
---|
| 169 | <indexterm zone="sysstat mpstat">
|
---|
| 170 | <primary sortas="b-mpstat">mpstat</primary>
|
---|
| 171 | </indexterm></listitem>
|
---|
| 172 | </varlistentry>
|
---|
| 173 |
|
---|
| 174 | <varlistentry id="sar">
|
---|
| 175 | <term><command>sar</command></term>
|
---|
| 176 | <listitem><para> collects, reports and saves system activity
|
---|
| 177 | information.</para>
|
---|
| 178 | <indexterm zone="sysstat sar">
|
---|
| 179 | <primary sortas="b-sar">sar</primary>
|
---|
| 180 | </indexterm></listitem>
|
---|
| 181 | </varlistentry>
|
---|
| 182 |
|
---|
| 183 | <varlistentry id="sa1">
|
---|
| 184 | <term><command>sa1</command></term>
|
---|
| 185 | <listitem><para>collects and stores binary data in the system activity daily
|
---|
| 186 | data file. It is a front end to <filename>sadc</filename> designed to be run
|
---|
| 187 | from cron.</para>
|
---|
| 188 | <indexterm zone="sysstat sa1">
|
---|
| 189 | <primary sortas="b-sa1">sa1</primary>
|
---|
| 190 | </indexterm></listitem>
|
---|
| 191 | </varlistentry>
|
---|
| 192 |
|
---|
| 193 | <varlistentry id="sa2">
|
---|
| 194 | <term><command>sa2</command></term>
|
---|
| 195 | <listitem><para>writes a summarized daily activity report. It is a front end
|
---|
| 196 | to <command>sar</command> designed to be run from cron.</para>
|
---|
| 197 | <indexterm zone="sysstat sa2">
|
---|
| 198 | <primary sortas="b-sa2">sa2</primary>
|
---|
| 199 | </indexterm></listitem>
|
---|
| 200 | </varlistentry>
|
---|
| 201 |
|
---|
| 202 | <varlistentry id="sadc">
|
---|
| 203 | <term><command>sadc</command></term>
|
---|
| 204 | <listitem><para>is the system activity data collector, used as a backend for
|
---|
| 205 | <command>sar</command>.</para>
|
---|
| 206 | <indexterm zone="sysstat sadc">
|
---|
| 207 | <primary sortas="b-sadc">sadc</primary>
|
---|
| 208 | </indexterm></listitem>
|
---|
| 209 | </varlistentry>
|
---|
| 210 | </variablelist>
|
---|
[f384a9d] | 211 |
|
---|
| 212 | </sect2>
|
---|
| 213 |
|
---|
| 214 | </sect1>
|
---|