OpenBSD CVS

CVS log for src/usr.sbin/iostat/iostat.c


[BACK] Up to [local] / src / usr.sbin / iostat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.47 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:13 2023 UTC (15 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.46: +1 -2 lines
Diff to previous 1.46 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.46 / (download) - annotate - [select for diffs], Wed Dec 28 20:56:37 2022 UTC (17 months, 1 week ago) by cheloha
Branch: MAIN
Changes since 1.45: +27 -9 lines
Diff to previous 1.45 (colored)

iostat(8): implement periodic display with setitimer(2)

Prefer setitimer(2)+sigsuspend(2) to nanosleep(2) when performing
periodic work.  The latter drifts.

Link: https://marc.info/?l=openbsd-tech&m=167068674625838&w=2

ok millert@

Revision 1.45 / (download) - annotate - [select for diffs], Sun Dec 4 23:50:51 2022 UTC (18 months ago) by cheloha
Branch: MAIN
Changes since 1.44: +1 -2 lines
Diff to previous 1.44 (colored)

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.  We can
handle this case with the "default" failure case with no loss of
legibility.  Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@.  With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2

ok naddy@ millert@ dlg@

Revision 1.44 / (download) - annotate - [select for diffs], Mon Jul 12 15:09:21 2021 UTC (2 years, 10 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Change the error reporting pattern throughout the tree when unveil
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.

Work done and verified by Ashton Fagg <ashton@fagg.id.au>

ok deraadt@ semarie@ claudio@

Revision 1.43 / (download) - annotate - [select for diffs], Fri Aug 21 01:10:07 2020 UTC (3 years, 9 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.42: +7 -10 lines
Diff to previous 1.42 (colored)

Fix column spacing for disk transfer speeds

"IO rates above 100 MB/s are common with SSD;  this patch expands the column
so it stays neatly printed." - report and initial diff from John Carmack,

Refinements and adjustment of missing views from me,
OK benno

Revision 1.42 / (download) - annotate - [select for diffs], Mon Oct 14 19:22:17 2019 UTC (4 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.41: +7 -1 lines
Diff to previous 1.41 (colored)

pledge() won't work but we can use unveil() to reduce filesystem access
in these 3 related programs (they borrow parts of each other using .PATH)
Hopefully no regressions, ktrace checks by myself and mestre

Revision 1.41 / (download) - annotate - [select for diffs], Wed Sep 5 09:35:49 2018 UTC (5 years, 9 months ago) by yasuoka
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

Add "op" column for CP_SPIN.  Diff from fukaumi at soum.co.jp

ok solene

Revision 1.40 / (download) - annotate - [select for diffs], Sat Feb 10 19:49:50 2018 UTC (6 years, 3 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

Cap wait/interval at 100 million seconds.

Keeps nanosleep(2) from choking.

While here, call the argument to the -w flag "wait" in the
error message to match up with documentation and usage().

ok tedu@ deraadt@ tb@

Revision 1.39 / (download) - annotate - [select for diffs], Fri Oct 23 08:21:27 2015 UTC (8 years, 7 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.38: +5 -7 lines
Diff to previous 1.38 (colored)

simplify argv back compat

Revision 1.38 / (download) - annotate - [select for diffs], Wed Mar 18 15:14:47 2015 UTC (9 years, 2 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.37: +4 -1 lines
Diff to previous 1.37 (colored)

check for invalid disknames

Revision 1.37 / (download) - annotate - [select for diffs], Tue Oct 28 05:48:22 2014 UTC (9 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.36: +5 -5 lines
Diff to previous 1.36 (colored)

use nanosleep() instead of hackish select(); ok dlg

Revision 1.36 / (download) - annotate - [select for diffs], Sun Oct 26 20:37:15 2014 UTC (9 years, 7 months ago) by brad
Branch: MAIN
Changes since 1.35: +9 -5 lines
Diff to previous 1.35 (colored)

Add explicit braces to suppress compiler warnings.

iostat.c:214:3: warning: add explicit braces to avoid dangling else [-Wdangling-else]

ok guenther@ millert@

Revision 1.35 / (download) - annotate - [select for diffs], Mon Sep 15 19:08:22 2014 UTC (9 years, 8 months ago) by miod
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Remove non-standard <sys/dkstat.h> header. It has not contained anything
related to disk stastics for almost 17 years, and the remaining
userland-visible defines duplicate those found in <sys/sched.h>.

Move the remaining _KERNEL defines to <sys/tty.h> where they belong, and
update all users to cope with this.

ok kettenis@

Revision 1.34 / (download) - annotate - [select for diffs], Thu Feb 13 21:01:23 2014 UTC (10 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.33: +18 -8 lines
Diff to previous 1.33 (colored)

atoi -> strtonum

Revision 1.33 / (download) - annotate - [select for diffs], Thu Feb 13 08:46:36 2014 UTC (10 years, 3 months ago) by tedu
Branch: MAIN
Changes since 1.32: +28 -8 lines
Diff to previous 1.32 (colored)

totals tend to be larger, give them some more room to breathe

Revision 1.32 / (download) - annotate - [select for diffs], Sat Nov 23 22:51:42 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

yet more unsigned char casts for ctype
checked by jca

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jun 4 21:43:11 2013 UTC (11 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.30: +31 -35 lines
Diff to previous 1.30 (colored)

tabs are not so expensive we can't intent this file properly

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jun 4 21:17:45 2013 UTC (11 years ago) by tedu
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

tweak the headers header too

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jun 4 21:14:28 2013 UTC (11 years ago) by tedu
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

not sure who uses the "alternate" display, but the columns look like ass

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jun 26 21:37:59 2012 UTC (11 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.27: +5 -5 lines
Diff to previous 1.27 (colored)

tweak column spacing to allow for larger numbers

Revision 1.27 / (download) - annotate - [select for diffs], Sun Nov 22 22:22:14 2009 UTC (14 years, 6 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.26: +5 -1 lines
Diff to previous 1.26 (colored)

don't repeat the banner if not a tty.
add a -c count option to netstat.
tweak spacing to not smear fields in vmstat.
ok deraadt sthen

Revision 1.26 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:51 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +1 -16 lines
Diff to previous 1.25 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.25 / (download) - annotate - [select for diffs], Sun Feb 18 20:41:34 2007 UTC (17 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

- sync SYNOPSIS and usage()
- add args to the option list
- I/O does not need .Tn
- .Nm does not need an argument

based on a diff from Igor Sobrado

Revision 1.24 / (download) - annotate - [select for diffs], Thu Mar 30 23:48:39 2006 UTC (18 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored)

i am stunned how little was needed to make lint happy in this
terrible place

Revision 1.23 / (download) - annotate - [select for diffs], Mon Mar 13 19:31:07 2006 UTC (18 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.22: +13 -14 lines
Diff to previous 1.22 (colored)

delint; from David Hill

Revision 1.22 / (download) - annotate - [select for diffs], Fri Apr 1 03:32:47 2005 UTC (19 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored)

spacing

Revision 1.21 / (download) - annotate - [select for diffs], Sun Aug 8 00:19:16 2004 UTC (19 years, 10 months ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored)

do the right math to find out what the average kbytes per transfer is
problem found and fix tested by naddy@, ok deraadt@ jolan@

Revision 1.20 / (download) - annotate - [select for diffs], Sun Aug 1 18:32:19 2004 UTC (19 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.19: +8 -13 lines
Diff to previous 1.19 (colored)

ansi cleanup; khalek@linuxgamers.net

Revision 1.19 / (download) - annotate - [select for diffs], Sun Feb 15 02:45:47 2004 UTC (20 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.18: +12 -7 lines
Diff to previous 1.18 (colored)

new arg to disk_unbusy, to record separate read/write statistics.
looked at by various, testing henning@ mcbride@ dan weeks
mostly from netbsd via Pedro Martelletto <pbastos@rdc.puc-rio.br>

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jun 26 19:47:09 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.17: +3 -5 lines
Diff to previous 1.17 (colored)

strict proto cleanups

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jun 2 23:36:53 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.16: +2 -6 lines
Diff to previous 1.16 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Dec 16 01:57:05 2002 UTC (21 years, 5 months ago) by tdeval
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

Make systat(1), iostat(8) and vmstat(8) automatically update their disk
statistics when a device is added/removed.  ok deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Sun Aug 4 00:51:01 2002 UTC (21 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.14: +3 -1 lines
Diff to previous 1.14 (colored)

only open kvm once between these two

Revision 1.14 / (download) - annotate - [select for diffs], Thu May 30 19:09:05 2002 UTC (22 years ago) by deraadt
Branch: MAIN
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)

minor KNF

Revision 1.13 / (download) - annotate - [select for diffs], Thu Mar 14 16:44:25 2002 UTC (22 years, 3 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.12: +5 -5 lines
Diff to previous 1.12 (colored)

kill more registers.

millert@ ok

Revision 1.12 / (download) - annotate - [select for diffs], Sat Feb 16 21:28:03 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.11: +13 -13 lines
Diff to previous 1.11 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Nov 17 19:49:38 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

use volatile sig_atomic_t where possible; simply volatile i other places

Revision 1.10 / (download) - annotate - [select for diffs], Wed Nov 14 20:04:40 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +15 -6 lines
Diff to previous 1.9 (colored)

kill signal race.  insanely, the code becomes simpler

Revision 1.9 / (download) - annotate - [select for diffs], Mon May 14 07:22:06 2001 UTC (23 years, 1 month ago) by angelos
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.8: +1 -14 lines
Diff to previous 1.8 (colored)

No need for setgid kmem anymore, we can use sysctl to get all the
relevant information.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jul 8 22:13:27 1998 UTC (25 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.7: +5 -1 lines
Diff to previous 1.7 (colored)

whack kmem gid after kvm_openfiles()

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jan 15 23:44:01 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.6 / (download) - annotate - [select for diffs], Sun Dec 22 03:28:56 1996 UTC (27 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +4 -2 lines
Diff to previous 1.5 (colored)

Deal with _POSIX_SAVED_IDS when relinquishing privileges

Revision 1.5 / (download) - annotate - [select for diffs], Sat Nov 2 00:35:50 1996 UTC (27 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.4: +6 -6 lines
Diff to previous 1.4 (colored)

"K" and "Kb" -> "KB" as well as "Mb" -> "MB" so people don't get confused
and thing we are talking about *bits as opposed to *bytes.  From NetBSD.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 11 22:32:42 1996 UTC (27 years, 10 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

There are disk devicenames wider than three chars

Revision 1.3 / (download) - annotate - [select for diffs], Wed May 22 11:35:49 1996 UTC (28 years ago) by deraadt
Branch: MAIN
Changes since 1.2: +6 -6 lines
Diff to previous 1.2 (colored)

libutil

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 3 02:52:34 1996 UTC (28 years, 3 months ago) by tholo
Branch: MAIN
Changes since 1.1: +298 -262 lines
Diff to previous 1.1 (colored)

WOrking disk statistics; NetBSD PR 2161

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:47:37 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:47:37 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.