Index | Thread | Search

From:
Jan Stary <hans@stare.cz>
Subject:
Re: iostat: display all drives
To:
Jason McIntyre <jmc@kerhand.co.uk>
Cc:
tech@openbsd.org
Date:
Mon, 20 May 2024 16:09:08 +0200

Download raw body.

Thread
  • Jan Stary:

    iostat: display all drives

  • On May 20 14:53:15, jmc@kerhand.co.uk wrote:
    > 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...
    
    I believe it relates to the very next sentence;
    better diff below, making it explicit and using the mighty semicolon.
    
    	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 14:07:03 -0000
    @@ -134,13 +134,13 @@ 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.
    -To force
    +displays all drives;
    +to force
     .Nm
    -to display specific drives, their names may be supplied on the command
    -line.
    +to display only specific drives,
    +their names may be supplied on the command line.
     .Pp
     .Bl -tag -width indent -compact
     .It KB/t
    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 14:07:03 -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;
    
    
    > 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;
    > >
    
    
    
  • Jan Stary:

    iostat: display all drives