9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: steve.simon@snellwilcox.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] iostats ?
Date: Thu, 24 Jul 2003 16:09:00 +0100	[thread overview]
Message-ID: <f06b7af3b4f10d50eed6cecdfa7c3824@yourdomain.dom> (raw)
In-Reply-To: <398344982@snellwilcox.com>

[-- 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.


       reply	other threads:[~2003-07-24 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <398344982@snellwilcox.com>
2003-07-24 15:09 ` steve.simon [this message]
2003-07-24 13:13 steve.simon
2003-07-24 14:25 ` rog

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f06b7af3b4f10d50eed6cecdfa7c3824@yourdomain.dom \
    --to=steve.simon@snellwilcox.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).