Date: Wed, 05 May 2010 18:03:08 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Peter Steele <psteele@maxiscale.com> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Suspect results from iostat--FBSD bug? Message-ID: <877hnigzmb.fsf@kobe.laptop> In-Reply-To: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3E0CB171@MBX03.exg5.exghost.com> (Peter Steele's message of "Wed, 5 May 2010 07:34:55 -0500") References: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3E0CB171@MBX03.exg5.exghost.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 5 May 2010 07:34:55 -0500, Peter Steele <psteele@maxiscale.com> wrote: > We use iostat to collect statistics of hard drive activity. We've been > seeing some values for the transaction wait column that look > suspicious. This is easy to reproduce by just running iostat > repeatedly over a short period of time, as I show below. Notice the > third from last column. From what I understand, when run in this > fashion the values displayed are averaged over the system uptime. I'd > expect then for the transaction wait value to not take these sudden > dips. Is there an explanation for this? > > # for ((i=1; i <=100; i++)); do iostat -dxI ad8|tail +3; sleep 5; done > ad8 10291.0 569044.0 151986.0 10164944.0 4294967295 47.7 93 > ad8 10304.0 570070.0 152012.0 10185395.0 4294967295 47.6 93 > ad8 10312.0 571047.0 152028.0 10204575.0 85 47.5 93 This looks like a bug in iostat. 4294967295 == 2 * 32 - -1 It seems that some call returns (unsigned long)-1, e.g. to indicate a failing system/library call but iostat still prints the result: : keramida@kobe:/home/keramida$ cat -n demo.c : 1 #include <limits.h> : 2 #include <stdio.h> : 3 : 4 int : 5 main(void) : 6 { : 7 (void)printf("-1 => %lu\n", (unsigned long)-1); : 8 return 0; : 9 } : keramida@kobe:/home/keramida$ cc demo.c : keramida@kobe:/home/keramida$ ./a.out : -1 => 4294967295 : keramida@kobe:/home/keramida$ Which _precise_ version of FreeBSD are you using?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?877hnigzmb.fsf>