suse 9下的iostat 长时间运行后,显示结果不正确

来源:互联网 发布:ubuntu安装分区教程 编辑:程序博客网 时间:2024/05/23 00:17

通过查看源码分析得知

原因:Version 5.0.3以前的iostat在获取/proc/diskstats的信息时采用的是32位,会导致数据的溢出,从而结果显示不正确

升级到Version 5.0.3及以后版本解决;最新版本位置:

http://pagesperso-orange.fr/sebastien.godard/

 

sysstat: System performance tools for the Linux operating system...
--
(C) 1999-2009 Sebastien Godard (sysstat <at> orange.fr)

The latest version of sysstat can always be found on my web site at:

http://pagesperso-orange.fr/sebastien.godard/

sysstat package is also available at ibiblio's Linux archive
in the following directory:

ftp://ibiblio.org/pub/Linux/system/status/

See the CHANGES file to know the new features/improvements/bug fixes added
in this release of sysstat.


INSTALLATION
------------

The sysstat utilities are a collection of performance monitoring tools for
Linux. These include mpstat, iostat, pidstat, sar, sadc, sadf and sa tools.

The first stage is to configure sysstat for your system:

 ./configure

You can set several variables and parameters on the command line.
Please enter "./configure --help" to display them.
There is another way to configure sysstat instead of entering "./configure":
this is the Interactive Configuration script (iconfig) which will ask you
for the value of the main sysstat variables and parameters.
Enter "./iconfig" then answer the questions or enter Return to accept
the (sane) default values. For yes/no questions, please answer 'y' or 'n'
(without the quotes): It is case sensitive! You can also enter '?' to get
a help message that will explain the meaning of each variable or parameter.

The next stage is to build the various binary files. Enter:

 make

Then log in as root and enter:

 make install

(see next section to know the files that are installed).
That's all!

Of course tell me if there are any problems. This is the only way I can improve
'sysstat'. Please also remember to read the FAQ included in this package.

Patches and suggestions for improvements are always welcome!
Send them to (sysstat <at> orange.fr).


FILES THAT ARE INSTALLED
------------------------

I _hate_ when packages install files everywhere on my disk and I don't know
where...
So here is the list of files installed by sysstat, when you ask for a
complete installation.
${PREFIX} is the value of the PREFIX variable defined in the Makefile
(usually set to /usr/local or /usr).

${PREFIX}/lib/sa/sadc
${PREFIX}/lib/sa/sa1
${PREFIX}/lib/sa/sa2
${PREFIX}/bin/sar
${PREFIX}/bin/sadf
${PREFIX}/bin/iostat
${PREFIX}/bin/mpstat
${PREFIX}/bin/pidstat
${PREFIX}(/share)/man/man8/sadc.8
${PREFIX}(/share)/man/man8/sa1.8
${PREFIX}(/share)/man/man8/sa2.8
${PREFIX}(/share)/man/man1/sar.1
${PREFIX}(/share)/man/man1/sadf.1
${PREFIX}(/share)/man/man1/iostat.1
${PREFIX}(/share)/man/man1/mpstat.1
${PREFIX}(/share)/man/man1/pidstat.1
${PREFIX}/share/locale/*/LC_MESSAGES/sysstat.mo
${PREFIX}/share/doc/sysstat-x.y.z/*
/var/log/sa
${INIT_DIR}/sysstat
/etc/sysconfig/sysstat
/etc/sysconfig/sysstat.ioconf
/etc/cron.d/sysstat
/etc/rc.d/rc.sysstat  for [SLACKWARE]
${RC_DIR}/rc2.d/S03sysstat
${RC_DIR}/rc3.d/S03sysstat
${RC_DIR}/rc5.d/S03sysstat

with:

${INIT_DIR}=/etc/rc.d/init.d/ for [REDHAT] [CALDERA] [MANDRIVA] [TURBOLINUX] [KONDARA]
${INIT_DIR}=/sbin/init.d/ for [SUSE <= 7.0]
${INIT_DIR}=/etc/init.d/ for [SUSE >= 7.1] [DEBIAN]
${RC_DIR}=/etc/rc.d/  for [REDHAT] [CALDERA] [MANDRIVA] [TURBOLINUX] [KONDARA] [SLACKWARE]
${RC_DIR}=/sbin/init.d/  for [SUSE <= 7.0]
${RC_DIR}=/etc/init.d/  for [SUSE >= 7.1]
${RC_DIR}=/etc/   for [DEBIAN]

sysstat may also install some links in ${RC_DIR}/rc[0146].d/ directory
if chkconfig is used.

MISCELLANEOUS
-------------

The sar, mpstat, iostat and pidstat commands are only front-ends to the kernel
proc filesystem... They cannot display statistics that Linux does not
provide, nor can they be more accurate than Linux is.
The sysstat package has been tested on Linux kernels 2.0.x, 2.2.x, 2.4.x and
2.6.x, but since new statistics are added in sysstat, they are not necessarily
present in old kernels.

It has been designed with National Language Support (NLS) in mind, using
the GNU gettext package (available at http://www.gnu.org).
sysstat has been translated into several languages.
Anyway you are welcome if you want to make other translations available ;-)
Please read the README-nls file in the nls directory before.

--
Sebastien Godard (sysstat <at> orange.fr)

 

 

该包的CHANGE中描述

2004/04/07: Version 5.0.3 - Sebastien Godard (sysstat <at> wanadoo.fr)
 * iostat now reads the number of sectors in /proc/diskstats or
   from sysfs as 64-bit unsigned values.
 * iostat and mpstat now read CPU data and the number of
   interrupts in /proc/stat as 64-bit unsigned values.

 * sar uses "%u" instead of "%d" to read unsigned integer
   values _everywhere_.
 * sar and sadc are now a little bit more verbose when dealing
   with invalid activity files.
 * Network interface name size is now read from include file
   <net/if.h>.
 * FAQ polished up.
 * Slovak translation added. NLS updated.
 * Typo fixed in iostat manual page.
 * Makefile and CREDITS file updated.
 * isag upgraded to version 1.26 (isag package release 0.81.0).

原创粉丝点击