9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] iostats ?
@ 2003-07-24 13:13 steve.simon
  2003-07-24 14:25 ` rog
  0 siblings, 1 reply; 3+ messages in thread
From: steve.simon @ 2003-07-24 13:13 UTC (permalink / raw)
  To: 9fans

Hi,

Is iostats broken or am I missing somthing?

	iostats ls /bin /bin/* > /dev/null

reports zero average time for all 9p operations, and

	read      85629 bytes, 8.362207e+07 Kb/sec
	write     6401 bytes, 6250977 Kb/sec
	protocol  93942 bytes, 9.174023e+07 Kb/sec

and some impressive throughput rates...

I am running on a 233Mhz P1 so perhaps my clock tick rate
is confused?

-Steve


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] iostats ?
  2003-07-24 13:13 [9fans] iostats ? steve.simon
@ 2003-07-24 14:25 ` rog
  0 siblings, 0 replies; 3+ messages in thread
From: rog @ 2003-07-24 14:25 UTC (permalink / raw)
  To: 9fans

> 	iostats ls /bin /bin/* > /dev/null
> reports zero average time for all 9p operations, and
[...]
> and some impressive throughput rates...

it's been broken, quite recently it seems.
in /sys/src/cmd/iostats/statsrv.c:/^update change

<	ulong t2;
<
<	t2 = msec();
<	t -= t2;

to

>	t = msec() - t;

then the numbers become non-zero, at least.

the e+07 numbers are due to the dodgy "avoid zero devide" hack
in iostats.c:

	brpsec = (float)stats->totread / (((float)rpc->time/1000.0)+.000001);
	bwpsec = (float)stats->totwrite / (((float)rpc->time/1000.0)+.000001);
	bppsec = (float)stats->nproto / ((ttime/1000.0)+.000001);

maybe it'd be less misleading just to do:

	setfcr(getfcr() & ~FPZDIV);

before the calculations, and remove the .000001 fudge factor: then if
there were no ops the throughput comes out as +Inf.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] iostats ?
       [not found] <398344982@snellwilcox.com>
@ 2003-07-24 15:09 ` steve.simon
  0 siblings, 0 replies; 3+ messages in thread
From: steve.simon @ 2003-07-24 15:09 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 58 bytes --]

Thanks for that,

All working as expected now.

-Steve

[-- Attachment #2: Type: message/rfc822, Size: 1356 bytes --]

From: 9fans@cse.psu.edu
To: 9fans@cse.psu.edu
Subject: Re: [9fans] iostats ?
Date: Thu, 24 Jul 2003 15:25:14 +0100
Message-ID: <398344982@snellwilcox.com>

> 	iostats ls /bin /bin/* > /dev/null 
> reports zero average time for all 9p operations, and
[...]
> and some impressive throughput rates...

it's been broken, quite recently it seems.
in /sys/src/cmd/iostats/statsrv.c:/^update change 

<	ulong t2;
<
<	t2 = msec();
<	t -= t2;

to

>	t = msec() - t;

then the numbers become non-zero, at least.

the e+07 numbers are due to the dodgy "avoid zero devide" hack
in iostats.c:

	brpsec = (float)stats->totread / (((float)rpc->time/1000.0)+.000001);
	bwpsec = (float)stats->totwrite / (((float)rpc->time/1000.0)+.000001);
	bppsec = (float)stats->nproto / ((ttime/1000.0)+.000001);

maybe it'd be less misleading just to do:

	setfcr(getfcr() & ~FPZDIV);

before the calculations, and remove the .000001 fudge factor: then if
there were no ops the throughput comes out as +Inf.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-24 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-24 13:13 [9fans] iostats ? steve.simon
2003-07-24 14:25 ` rog
     [not found] <398344982@snellwilcox.com>
2003-07-24 15:09 ` steve.simon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).