[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 |
|
---|
[f1b1c20] | 7 | <!ENTITY sysstat-download-http "http://perso.wanadoo.fr/sebastien.godard/sysstat-&sysstat-version;.tar.xz">
|
---|
[dc2b407] | 8 | <!ENTITY sysstat-download-ftp " ">
|
---|
[d60cd837] | 9 | <!ENTITY sysstat-md5sum "56a4c76d47d7788daa01db5521e18776">
|
---|
| 10 | <!ENTITY sysstat-size "596 KB">
|
---|
| 11 | <!ENTITY sysstat-buildsize "8.1 MB">
|
---|
[fb19ab2c] | 12 | <!ENTITY sysstat-time "0.1 SBU">
|
---|
[f384a9d] | 13 | ]>
|
---|
| 14 |
|
---|
[880c568] | 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 |
|
---|
[880c568] | 23 | <title>Sysstat-&sysstat-version;</title>
|
---|
[eb2cf83a] | 24 |
|
---|
| 25 | <indexterm zone="sysstat">
|
---|
[880c568] | 26 | <primary sortas="a-Sysstat">Sysstat</primary>
|
---|
[eb2cf83a] | 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 |
|
---|
[43b1dad3] | 38 | &lfs83_checked;
|
---|
[fdc00738] | 39 |
|
---|
[eb2cf83a] | 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>Download (HTTP): <ulink url="&sysstat-download-http;"/></para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Download (FTP): <ulink url="&sysstat-download-ftp;"/></para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download MD5 sum: &sysstat-md5sum;</para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Download size: &sysstat-size;</para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Estimated disk space required: &sysstat-buildsize;</para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Estimated build time: &sysstat-time;</para>
|
---|
| 59 | </listitem>
|
---|
| 60 | </itemizedlist>
|
---|
| 61 |
|
---|
| 62 | <bridgehead renderas="sect3">Sysstat Dependencies</bridgehead>
|
---|
| 63 |
|
---|
[b058cd3] | 64 | <para>There are no build-time requirements for this package; however,
|
---|
| 65 | it is designed to be controlled by a cron daemon such as
|
---|
| 66 | <xref linkend="fcron"/>.</para>
|
---|
| 67 |
|
---|
[1039de3] | 68 | <para condition="html" role="usernotes">User Notes:
|
---|
| 69 | <ulink url="&blfs-wiki;/sysstat"/></para>
|
---|
| 70 |
|
---|
[eb2cf83a] | 71 | </sect2>
|
---|
| 72 |
|
---|
| 73 | <sect2 role="installation">
|
---|
| 74 | <title>Installation of Sysstat</title>
|
---|
| 75 |
|
---|
[481b3e8] | 76 | <para>Install <application>Sysstat</application> by running the
|
---|
[eb2cf83a] | 77 | following commands:</para>
|
---|
| 78 |
|
---|
[fdc00738] | 79 | <screen><userinput>sa_lib_dir=/usr/lib/sa \
|
---|
| 80 | sa_dir=/var/log/sa \
|
---|
| 81 | conf_dir=/etc/sysconfig \
|
---|
| 82 | ./configure --prefix=/usr \
|
---|
[fb19ab2c] | 83 | --disable-file-attr &&
|
---|
[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 |
|
---|
[1552ac8] | 92 | <para revision="systemd">
|
---|
| 93 | Install the systemd unit by running the following command as the
|
---|
| 94 | <systemitem class="username">root</systemitem> user:
|
---|
| 95 | </para>
|
---|
| 96 |
|
---|
| 97 | <screen role="root" revision="systemd"><userinput>install -v -m644 sysstat.service /lib/systemd/system/sysstat.service</userinput></screen>
|
---|
| 98 |
|
---|
[d4b0dc1] | 99 | <para revision="systemd">
|
---|
| 100 | Fix the systemd unit by running the following command as the
|
---|
| 101 | <systemitem class="username">root</systemitem> user:
|
---|
| 102 | </para>
|
---|
| 103 |
|
---|
| 104 | <screen role="root" revision="systemd"><userinput>sed -i "/^Also=/d" /lib/systemd/system/sysstat.service</userinput></screen>
|
---|
| 105 |
|
---|
[eb2cf83a] | 106 | </sect2>
|
---|
| 107 |
|
---|
| 108 | <sect2 role="commands">
|
---|
| 109 | <title>Command Explanations</title>
|
---|
| 110 |
|
---|
[5a195f0f] | 111 | <para><envar>sa_lib_dir</envar>: This environment variable specifies the
|
---|
| 112 | location of the package-specific library directory.</para>
|
---|
| 113 |
|
---|
| 114 | <para><envar>sa_dir</envar>: This environment variable specifies the
|
---|
| 115 | location of the directory containing the data files.</para>
|
---|
| 116 |
|
---|
| 117 | <para><envar>conf_dir</envar>: This environment variable specifies the
|
---|
| 118 | location of the system configuration directory.</para>
|
---|
| 119 |
|
---|
[fb19ab2c] | 120 | <para><parameter>--disable-file-attr</parameter>: Do not set attributes on
|
---|
| 121 | files being installed. This parameter causes the installation to ignore the
|
---|
| 122 | man group variable resulting in the man files having
|
---|
| 123 | <systemitem class="username">root</systemitem>:
|
---|
| 124 | <systemitem class="groupname">root</systemitem> ownership.</para>
|
---|
[5a195f0f] | 125 |
|
---|
[f1b1c20] | 126 | <note><para>Run <command>./configure --help</command> to see other influential
|
---|
[5a195f0f] | 127 | environment variables you can pass to <command>configure</command>. You may
|
---|
| 128 | want to use the <envar>history</envar> and <envar>compressafter</envar>
|
---|
[f1b1c20] | 129 | variables to customize the amount of data files kept on the system.</para></note>
|
---|
[eb2cf83a] | 130 |
|
---|
| 131 | </sect2>
|
---|
| 132 |
|
---|
| 133 | <sect2 role="configuration">
|
---|
| 134 | <title>Configuring Sysstat</title>
|
---|
| 135 |
|
---|
[f1b1c20] | 136 | <sect3 id="sysstat-config">
|
---|
| 137 | <title>Config Files</title>
|
---|
| 138 |
|
---|
| 139 | <para>
|
---|
| 140 | <filename>/etc/sysconfig/sysstat</filename> and
|
---|
| 141 | <filename>/etc/sysconfig/sysstat.ioconf</filename>
|
---|
| 142 | </para>
|
---|
| 143 |
|
---|
| 144 | <indexterm zone="sysstat sysstat-config">
|
---|
| 145 | <primary sortas="e-etc-sysconfig-sysstat">/etc/sysconfig/sysstat</primary>
|
---|
| 146 | </indexterm>
|
---|
| 147 | <indexterm zone="sysstat sysstat-config">
|
---|
| 148 | <primary sortas="e-etc-sysconfig-sysstat.ioconf">/etc/sysconfig/sysstat.ioconf</primary>
|
---|
| 149 | </indexterm>
|
---|
| 150 |
|
---|
| 151 | </sect3>
|
---|
| 152 |
|
---|
[eb2cf83a] | 153 | <sect3>
|
---|
| 154 | <title>Cron Information</title>
|
---|
| 155 |
|
---|
[481b3e8] | 156 | <para>To begin gathering <application>Sysstat</application> history
|
---|
| 157 | information, you must add to, or create a privileged user's crontab. The
|
---|
[5a195f0f] | 158 | history data location is
|
---|
[481b3e8] | 159 | <filename class="directory">/var/log/sa</filename>. The user running
|
---|
| 160 | <application>Sysstat</application> utilities via cron must have write
|
---|
[eb2cf83a] | 161 | access to this location.</para>
|
---|
| 162 |
|
---|
| 163 | <para>Below is an example of what to install in the crontab. Adjust the
|
---|
| 164 | parameters to suit your needs. Use <command>man sa1</command> and
|
---|
| 165 | <command>man sa2</command> for information about the commands.</para>
|
---|
| 166 |
|
---|
| 167 | <screen><literal># 8am-7pm activity reports every 10 minutes during weekdays
|
---|
[f384a9d] | 168 | 0 8-18 * * 1-5 /usr/lib/sa/sa1 600 6 &
|
---|
[481b3e8] | 169 |
|
---|
[f384a9d] | 170 | # 7pm-8am activity reports every hour during weekdays
|
---|
| 171 | 0 19-7 * * 1-5 /usr/lib/sa/sa1 &
|
---|
[481b3e8] | 172 |
|
---|
[f384a9d] | 173 | # Activity reports every hour on Saturday and Sunday
|
---|
| 174 | 0 * * * 0,6 /usr/lib/sa/sa1 &
|
---|
[481b3e8] | 175 |
|
---|
[f384a9d] | 176 | # Daily summary prepared at 19:05
|
---|
[eb2cf83a] | 177 | 5 19 * * * /usr/lib/sa/sa2 -A &</literal></screen>
|
---|
| 178 |
|
---|
| 179 | <para>Ensure you submit the revised crontab to the cron daemon.</para>
|
---|
| 180 |
|
---|
| 181 | </sect3>
|
---|
| 182 |
|
---|
| 183 | <sect3 id="sysstat-init">
|
---|
| 184 | <title>System Startup Information</title>
|
---|
| 185 |
|
---|
| 186 | <indexterm zone="sysstat sysstat-init">
|
---|
| 187 | <primary sortas="f-sysstat">sysstat</primary>
|
---|
| 188 | </indexterm>
|
---|
| 189 |
|
---|
[1552ac8] | 190 | <para revision="sysv">At system startup, a LINUX RESTART message must be
|
---|
| 191 | inserted in the daily data file to reinitialize the kernel counters. This
|
---|
| 192 | can be automated by installing the
|
---|
| 193 | <filename>/etc/rc.d/init.d/sysstat</filename> init script included in the
|
---|
| 194 | <xref linkend="bootscripts"/> package using the following command as the
|
---|
| 195 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 196 |
|
---|
| 197 | <screen role="root" revision="sysv"><userinput>make install-sysstat</userinput></screen>
|
---|
| 198 |
|
---|
| 199 | <para revision="systemd">At system startup, a LINUX RESTART message must
|
---|
| 200 | be inserted in the daily data file to reinitialize the kernel counters.
|
---|
| 201 | This can be automated by enabling the previously installed systemd unit
|
---|
| 202 | by running the following command as the
|
---|
[5ba48e8] | 203 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[eb2cf83a] | 204 |
|
---|
[1552ac8] | 205 | <screen role="root" revision="systemd"><userinput>systemctl enable sysstat</userinput></screen>
|
---|
[eb2cf83a] | 206 |
|
---|
| 207 | </sect3>
|
---|
| 208 |
|
---|
| 209 | </sect2>
|
---|
| 210 |
|
---|
| 211 | <sect2 role="content">
|
---|
| 212 | <title>Contents</title>
|
---|
| 213 |
|
---|
| 214 | <segmentedlist>
|
---|
| 215 | <segtitle>Installed Programs</segtitle>
|
---|
| 216 | <segtitle>Installed Libraries</segtitle>
|
---|
| 217 | <segtitle>Installed Directories</segtitle>
|
---|
| 218 |
|
---|
| 219 | <seglistitem>
|
---|
[b1d3c72a] | 220 | <seg>cifsiostat, iostat, mpstat, pidstat, sadf, sar, and tapestat</seg>
|
---|
[eb2cf83a] | 221 | <seg>None</seg>
|
---|
[b9a81999] | 222 | <seg>/usr/lib/sa,
|
---|
[fb19ab2c] | 223 | /usr/share/doc/sysstat-&sysstat-version; and
|
---|
[59382ab] | 224 | /var/log/sa
|
---|
| 225 | </seg>
|
---|
[eb2cf83a] | 226 | </seglistitem>
|
---|
| 227 | </segmentedlist>
|
---|
| 228 |
|
---|
| 229 | <variablelist>
|
---|
| 230 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 231 | <?dbfo list-presentation="list"?>
|
---|
| 232 | <?dbhtml list-presentation="table"?>
|
---|
| 233 |
|
---|
[fdc00738] | 234 | <varlistentry id="cifsiostat">
|
---|
| 235 | <term><command>cifsiostat</command></term>
|
---|
| 236 | <listitem>
|
---|
[0d7900a] | 237 | <para>displays statistics about read and write operations on CIFS
|
---|
[fdc00738] | 238 | filesystems.</para>
|
---|
| 239 | <indexterm zone="sysstat cifsiostat">
|
---|
| 240 | <primary sortas="b-cifsiostat">cifsiostat</primary>
|
---|
| 241 | </indexterm>
|
---|
| 242 | </listitem>
|
---|
| 243 | </varlistentry>
|
---|
| 244 |
|
---|
[eb2cf83a] | 245 | <varlistentry id="iostat">
|
---|
| 246 | <term><command>iostat</command></term>
|
---|
| 247 | <listitem>
|
---|
[481b3e8] | 248 | <para>reports CPU statistics and input/output
|
---|
[eb2cf83a] | 249 | statistics for devices and partitions.</para>
|
---|
| 250 | <indexterm zone="sysstat iostat">
|
---|
| 251 | <primary sortas="b-iostat">iostat</primary>
|
---|
| 252 | </indexterm>
|
---|
| 253 | </listitem>
|
---|
| 254 | </varlistentry>
|
---|
| 255 |
|
---|
[fdc00738] | 256 | <varlistentry id="mpstat">
|
---|
| 257 | <term><command>mpstat</command></term>
|
---|
[b058cd3] | 258 | <listitem>
|
---|
[fdc00738] | 259 | <para>writes activities for each available processor.</para>
|
---|
| 260 | <indexterm zone="sysstat mpstat">
|
---|
| 261 | <primary sortas="b-mpstat">mpstat</primary>
|
---|
[b058cd3] | 262 | </indexterm>
|
---|
| 263 | </listitem>
|
---|
| 264 | </varlistentry>
|
---|
| 265 |
|
---|
[5a195f0f] | 266 | <varlistentry id="pidstat">
|
---|
| 267 | <term><command>pidstat</command></term>
|
---|
| 268 | <listitem>
|
---|
| 269 | <para>is used for monitoring individual tasks currently being managed
|
---|
| 270 | by the Linux kernel.</para>
|
---|
| 271 | <indexterm zone="sysstat pidstat">
|
---|
| 272 | <primary sortas="b-pidstat">pidstat</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
[5ba48e8] | 277 | <varlistentry id="sadf">
|
---|
| 278 | <term><command>sadf</command></term>
|
---|
| 279 | <listitem>
|
---|
| 280 | <para>is used for displaying the contents of data files created by
|
---|
| 281 | the <command>sar</command> command. But unlike
|
---|
| 282 | <command>sar</command>, <command>sadf</command> can write its data
|
---|
| 283 | in many different formats.</para>
|
---|
| 284 | <indexterm zone="sysstat sadf">
|
---|
| 285 | <primary sortas="b-sadf">sadf</primary>
|
---|
| 286 | </indexterm>
|
---|
| 287 | </listitem>
|
---|
| 288 | </varlistentry>
|
---|
| 289 |
|
---|
[fdc00738] | 290 | <varlistentry id="sar">
|
---|
| 291 | <term><command>sar</command></term>
|
---|
| 292 | <listitem>
|
---|
[0d7900a] | 293 | <para>is used for displaying the contents of elected cumulative activity
|
---|
[fdc00738] | 294 | counters in the operating system.</para>
|
---|
| 295 | <indexterm zone="sysstat sar">
|
---|
| 296 | <primary sortas="b-sar">sar</primary>
|
---|
| 297 | </indexterm>
|
---|
| 298 | </listitem>
|
---|
| 299 | </varlistentry>
|
---|
| 300 |
|
---|
[b9a81999] | 301 | <varlistentry id="tapestat">
|
---|
| 302 | <term><command>tapestat</command></term>
|
---|
| 303 | <listitem>
|
---|
| 304 | <para>is used for monitoring the activity of tape drives connected to
|
---|
| 305 | a system.</para>
|
---|
| 306 | <indexterm zone="sysstat tapestat">
|
---|
| 307 | <primary sortas="b-tapestat">tapestat</primary>
|
---|
| 308 | </indexterm>
|
---|
| 309 | </listitem>
|
---|
| 310 | </varlistentry>
|
---|
| 311 |
|
---|
[eb2cf83a] | 312 | </variablelist>
|
---|
| 313 |
|
---|
| 314 | </sect2>
|
---|
[f384a9d] | 315 |
|
---|
| 316 | </sect1>
|
---|