Index | Thread | Search

From:
Jason McIntyre <jmc@kerhand.co.uk>
Subject:
Re: iostat: display all drives
To:
tech@openbsd.org
Date:
Mon, 20 May 2024 14:53:15 +0200

Download raw body.

Thread
i don't know if there's a reason, but if your change goes in, i suggest simply removing the note from the man page, since it hardly seems worth noting if we display them all...

jmc

On 20 May 2024 12:52:24 CEST, Jan Stary <hans@stare.cz> wrote:
>Is there a reason iostat only displays 4 drives by default?
>
>	Jan
>
>Index: iostat.8
>===================================================================
>RCS file: /cvs/src/usr.sbin/iostat/iostat.8,v
>retrieving revision 1.28
>diff -u -p -r1.28 iostat.8
>--- iostat.8	17 Sep 2022 11:39:09 -0000	1.28
>+++ iostat.8	20 May 2024 10:51:45 -0000
>@@ -134,9 +134,9 @@ characters written to terminals
> .It disks
> Disk operations.
> The header of the field is the disk name and unit number.
>-If more than four disk drives are configured in the system,
>+By default,
> .Nm
>-displays only the first four drives.
>+displays all drives.
> To force
> .Nm
> to display specific drives, their names may be supplied on the command
>Index: iostat.c
>===================================================================
>RCS file: /cvs/src/usr.sbin/iostat/iostat.c,v
>retrieving revision 1.47
>diff -u -p -r1.47 iostat.c
>--- iostat.c	8 Mar 2023 04:43:13 -0000	1.47
>+++ iostat.c	20 May 2024 10:51:45 -0000
>@@ -458,9 +458,8 @@ selectdrives(char *argv[])
> 		if (reps)
> 			interval = 1;
> 
>-	/* Pick up to 4 drives if none specified. */
> 	if (ndrives == 0)
>-		for (i = 0; i < dk_ndrive && ndrives < 4; i++) {
>+		for (i = 0; i < dk_ndrive ; i++) {
> 			if (cur.dk_select[i])
> 				continue;
> 			cur.dk_select[i] = 1;
>