From owner-freebsd-hackers Fri Nov 10 13:55:54 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from news.IAEhv.nl (news.IAE.nl [194.151.64.4]) by hub.freebsd.org (Postfix) with ESMTP id 33DFA37B479 for ; Fri, 10 Nov 2000 13:55:50 -0800 (PST) Received: (from uucp@localhost) by news.IAEhv.nl (8.9.1/8.9.1) with IAEhv.nl id WAA19119; Fri, 10 Nov 2000 22:55:40 +0100 (MET) Received: by adv.devet.org (Postfix, from userid 100) id E628F411B; Fri, 10 Nov 2000 22:55:29 +0100 (CET) To: float@firedrake.org Subject: Re: "iowait" CPU state X-Newsgroups: list.freebsd.hackers In-Reply-To: <20001110050823.A10063@firedrake.org> References: <20001109174946.B21468@firedrake.org> Organization: Eindhoven, the Netherlands Cc: hackers@freebsd.org Message-Id: <20001110215529.E628F411B@adv.devet.org> Date: Fri, 10 Nov 2000 22:55:29 +0100 (CET) From: Arjan.deVet@adv.iae.nl (Arjan de Vet) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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