amd64/117664: iostat can't display IO current vlaue in first
peterjeremy at optushome.com.au
Thu Nov 1 07:30:05 PDT 2007
The following reply was made to PR amd64/117664; it has been noted by GNATS.
From: Peter Jeremy <peterjeremy at optushome.com.au>
To: chifeng <chifeng at gmail.com>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: amd64/117664: iostat can't display IO current vlaue in first
Date: Wed, 31 Oct 2007 17:15:45 +1100
Content-Type: text/plain; charset=us-ascii
On Tue, Oct 30, 2007 at 07:22:39AM +0000, chifeng wrote:
>When I write a shell script plugin for munin, I hope get a current value o=
f IO statistics. But iostat can't do it, it first statistics that are print=
ed are avaraged over the system uptime. If I use "iostat -c 2 | tail -1 " c=
ommand, this will wait 2s at least.=20
>so I think for iostat first line, 1) iostat should be display current valu=
e, 2) have a parameter to display current value at least.=20
This is generic, rather than amd64-specific.
I believe you misunderstand iostat. There is no "current value" as
you desire. There are a variety of system counters that get updated
when various events occur and iostat reports the change in those
counters over the specified interval. The only way to determine the
system activity, averaged over two seconds, is to sample the counters,
wait two seconds, sample the counters again and reports the differences.
I suggest you start a thread on (eg) freebsd-questions explaining what
you are trying to achieve and someone there may be able to assist.
In the meantime, you might like to investigate the sysutils/bsdsar port.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
-----END PGP SIGNATURE-----
More information about the freebsd-amd64