Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2000 22:55:29 +0100 (CET)
From:      Arjan.deVet@adv.iae.nl (Arjan de Vet)
To:        float@firedrake.org
Cc:        hackers@freebsd.org
Subject:   Re: "iowait" CPU state
Message-ID:  <20001110215529.E628F411B@adv.devet.org>
In-Reply-To: <20001110050823.A10063@firedrake.org>
References:  <20001109174946.B21468@firedrake.org> <Pine.BSF.4.21.0011101233080.19203-100000@starbug.ugh.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20001110050823.A10063@firedrake.org> you write:

>> > not how busy the disks are.  I want relative data, not absolute.
>> 
>> systat -vmstat?
>
>Thank you!  This gets the me disk %busy, which is one of the things I
>was looking for.  Now, can anyone tell me how to tell what percentage of

That was something I was looking for some time ago as well, so I wrote
and submitted the patch for %busy :-). It's not 100% accurate, see the
systat source for the details.

This patch will add an extra row 'queue' displaying the amount of
commands queued for the disk:

Index: vmstat.c
===================================================================
RCS file: /home/freebsd/CVS/src/usr.bin/systat/vmstat.c,v
retrieving revision 1.38.2.2
diff -u -r1.38.2.2 vmstat.c
--- vmstat.c	2000/07/02 10:03:17	1.38.2.2
+++ vmstat.c	2000/07/06 22:07:57
@@ -335,6 +335,7 @@
 	mvprintw(DISKROW + 2, DISKCOL, "tps");
 	mvprintw(DISKROW + 3, DISKCOL, "MB/s");
 	mvprintw(DISKROW + 4, DISKCOL, "%% busy");
+	mvprintw(DISKROW + 5, DISKCOL, "queue");
 	/*
 	 * For now, we don't support a fourth disk statistic.  So there's
 	 * no point in providing a label for it.  If someone can think of a
@@ -841,4 +842,5 @@
 	putlongdouble(transfers_per_second, DISKROW + 2, c, 5, 0, 0);
 	putlongdouble(mb_per_second, DISKROW + 3, c, 5, 2, 0);
 	putlongdouble(device_busy * 100 / elapsed_time, DISKROW + 4, c, 5, 0, 0);
+	putlongdouble(now->dinfo->devices[di].busy_count, DISKROW + 5, c, 5, 0, 0);
 }

>processor time is being spent waiting for disk I/O to complete?

Hmm, I thought the CPU never spends time waiting for disk I/O, it just
schedules another process? How should iowait% be calculated then? Is the
percentage of time the CPU was idle and one or more processes were
blocked on disk I/O?

Arjan

-- 
Arjan de Vet, Eindhoven, The Netherlands              <Arjan.deVet@adv.iae.nl>
URL: http://www.iae.nl/users/devet/           for PGP key: finger devet@iae.nl



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001110215529.E628F411B>