History log of /openbsd-current/usr.bin/systat/iostat.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.50 14-Aug-2021 millert

Fix iostat per-device values when in boot time mode ('b').
The values should be displayed as-is and not normalized based on
the sleep interval. From Anindya Mukherjee


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.49 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


# 1.48 08-May-2019 tedu

allow switching to print stats since boot via 'b'.
ok beck deraadt


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.47 16-Apr-2017 beck

Statistics for high memory flips in the buffer cache
nits from deraadt@
ok krw@ guenther@ kettenis@


# 1.46 02-Apr-2017 beck

Make dma range buffer cache pages visible in systat io
ok deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.45 16-Jan-2015 deraadt

first batch of programs adapting to the namespace cleanup
(pfvar.h nameser.h proc.h ucred.h)
ok guenther millert, and some review from doug as well.


# 1.44 23-Nov-2014 guenther

<sys/buf.h> isn't actually needed here

ok tedu@


# 1.43 15-Sep-2014 miod

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 tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.42 09-Jul-2013 beck

back out the cache flipper temporarily to work out of tree.
will come back soon.
ok deraadt@


# 1.41 11-Jun-2013 beck

High memory page flipping for the buffer cache.

This change splits the buffer cache free lists into lists of dma reachable
buffers and high memory buffers based on the ranges returned by pmemrange.
Buffers move from dma to high memory as they age, but are flipped to dma
reachable memory if IO is needed to/from and high mem buffer. The total
amount of buffers allocated is now bufcachepercent of both the dma and
the high memory region.

This change allows the use of large buffer caches on amd64 using more than
4 GB of memory

ok tedu@ krw@ - testing by many.


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.40 19-Sep-2011 beck

clean up buffer cache statistics somewhat to
remove some now useless statistics, and add some
relevant ones regarding kva usage in the cache.

make systat io and show bcstats in ddb both show
these counters.

ok deraadt@ krw@


Revision tags: OPENBSD_5_0_BASE
# 1.39 06-Jul-2011 beck

add a couple of fields needed for buffer flipping, and change systat to
show useful info in systat io instead of goo


# 1.38 02-Mar-2011 jasper

- use a common FIELD_ADDR macro, instead of rolling 78 identical copies.

ok canacar@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.37 09-Aug-2009 art

Show the busy and mapped pages in iostat.


Revision tags: OPENBSD_4_6_BASE
# 1.36 06-Jun-2009 jasper

- remove unused macro from iostat.c
- minor space nit in engine.c

ok canacar@


Revision tags: OPENBSD_4_5_BASE
# 1.35 07-Dec-2008 canacar

Warning cleanup including unused variables and shadowed names


# 1.34 01-Dec-2008 naddy

Add a function to print a floating point field and use this to fix the
SEConds field in the iostat view.
ok and help canacar@


Revision tags: OPENBSD_4_4_BASE
# 1.33 22-Jul-2008 thib

change the bcachestats structures members to int64_t's and do the
printing in systat with the new print_fld_ssize() function.

"same diff I wrote" deraadt@
ok art@


# 1.32 07-Jul-2008 thib

bcachestats got bumbed too u_int64_t's and I forgot about
munging systat to handle the field with;

pointed out by mickey

ok canacar@


# 1.31 13-Jun-2008 canacar

Use refresh interval for rate calculation instead of the broken elapsed
time computation.


# 1.30 12-Jun-2008 canacar

New display engine for systat, based on pftop. Adds new views for pf
(status, state, rule, queue). While all displays work, some keyboard
comands are not implemented yet. Other features include better handling
of display resize and scrolling for long views. Committing now to fix
the remaining issues in the tree.
Testing and comments by otto@ and harding@, ok deraadt@


# 1.29 12-Jun-2008 beck

make bcachestats visible in systat io - from mickey.
ok thib@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.28 30-May-2007 otto

rename msec to the less confusing sec and improve the description in
the man page. ok dlg@ and jmc@


Revision tags: OPENBSD_4_1_BASE
# 1.27 25-Feb-2007 deraadt

use the 1 line load line from 'systat vm' on all the other displays, giving
them more room. much cleaner, and it is less code too; ok deanna


Revision tags: OPENBSD_4_0_BASE
# 1.26 29-Jun-2006 dlg

change bytes to kilobytes so i dont have to think about where megabytes
start.


# 1.25 27-Jun-2006 dlg

basically replace the iostat view with something that looks like the ifstat
view. noone seemed particularly attached to the last one, so this is
going in.

from deanna phillips


# 1.24 31-Mar-2006 deraadt

fairly simple cleanup, lots of testing done


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.23 15-Feb-2004 tedu

'split' command for iostat mode
from Pedro Martelletto <pbastos@rdc.puc-rio.br>


# 1.22 15-Feb-2004 tedu

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 tags: OPENBSD_3_4_BASE
# 1.21 03-Jun-2003 millert

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


Revision tags: OPENBSD_3_3_BASE
# 1.20 02-Feb-2003 henning

When disk activity exceeds 100kB/s divide length of bar by 10s and report
factor on RHS screen.

from netbsd (dsl@)

ok theo


# 1.19 16-Dec-2002 tdeval

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


Revision tags: OPENBSD_3_2_BASE
# 1.18 18-Jun-2002 deraadt

ANSI


Revision tags: OPENBSD_3_1_BASE
# 1.17 16-Feb-2002 millert

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.


# 1.16 07-Dec-2001 deraadt

move back. pvalchev -- the bug was quite obscure


# 1.15 07-Dec-2001 pvalchev

back out latest changes which cause problems on alpha/sparc64 until
they are fixed


# 1.14 23-Nov-2001 deraadt

fix signal races. use sysctl() instead of kvm where possible, and then KNF
the hell out of it; checked by miod


# 1.13 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.12 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.11 07-Jul-2000 deraadt

fixed formatting in numlabels; danh


Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.10 19-Dec-1997 deraadt

bye bye sprintf


Revision tags: OPENBSD_2_2_BASE
# 1.9 15-Jul-1997 kstailey

initxxx() routines return 1 on success, not zero.
(ob-theo-style-commit-comment: "Argh! *sigh* not-nice!")


# 1.8 23-Jun-1997 millert

Cleanup by Theo and myself. CMDLINE changed to long to make
command line work on 64bit platforms. This is somewhat bogus
and is really just a temporary workaround (there may be a curses bug).


Revision tags: OPENBSD_2_1_BASE
# 1.7 04-Feb-1997 kstailey

display CPU stats on iostat screen even if diskless


# 1.6 06-Jan-1997 maja

Allow device names to be four characters (eg mcd0 or acd0). -moj


Revision tags: OPENBSD_2_0_BASE
# 1.5 26-Jun-1996 deraadt

rcsid


# 1.4 02-Jun-1996 mickey

it compiles w/ new curses


# 1.3 22-May-1996 deraadt

libutil


# 1.2 27-Mar-1996 niklas

From NetBSD: merge of 960317


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.49 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


# 1.48 08-May-2019 tedu

allow switching to print stats since boot via 'b'.
ok beck deraadt


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.47 16-Apr-2017 beck

Statistics for high memory flips in the buffer cache
nits from deraadt@
ok krw@ guenther@ kettenis@


# 1.46 02-Apr-2017 beck

Make dma range buffer cache pages visible in systat io
ok deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.45 16-Jan-2015 deraadt

first batch of programs adapting to the namespace cleanup
(pfvar.h nameser.h proc.h ucred.h)
ok guenther millert, and some review from doug as well.


# 1.44 23-Nov-2014 guenther

<sys/buf.h> isn't actually needed here

ok tedu@


# 1.43 15-Sep-2014 miod

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 tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.42 09-Jul-2013 beck

back out the cache flipper temporarily to work out of tree.
will come back soon.
ok deraadt@


# 1.41 11-Jun-2013 beck

High memory page flipping for the buffer cache.

This change splits the buffer cache free lists into lists of dma reachable
buffers and high memory buffers based on the ranges returned by pmemrange.
Buffers move from dma to high memory as they age, but are flipped to dma
reachable memory if IO is needed to/from and high mem buffer. The total
amount of buffers allocated is now bufcachepercent of both the dma and
the high memory region.

This change allows the use of large buffer caches on amd64 using more than
4 GB of memory

ok tedu@ krw@ - testing by many.


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.40 19-Sep-2011 beck

clean up buffer cache statistics somewhat to
remove some now useless statistics, and add some
relevant ones regarding kva usage in the cache.

make systat io and show bcstats in ddb both show
these counters.

ok deraadt@ krw@


Revision tags: OPENBSD_5_0_BASE
# 1.39 06-Jul-2011 beck

add a couple of fields needed for buffer flipping, and change systat to
show useful info in systat io instead of goo


# 1.38 02-Mar-2011 jasper

- use a common FIELD_ADDR macro, instead of rolling 78 identical copies.

ok canacar@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.37 09-Aug-2009 art

Show the busy and mapped pages in iostat.


Revision tags: OPENBSD_4_6_BASE
# 1.36 06-Jun-2009 jasper

- remove unused macro from iostat.c
- minor space nit in engine.c

ok canacar@


Revision tags: OPENBSD_4_5_BASE
# 1.35 07-Dec-2008 canacar

Warning cleanup including unused variables and shadowed names


# 1.34 01-Dec-2008 naddy

Add a function to print a floating point field and use this to fix the
SEConds field in the iostat view.
ok and help canacar@


Revision tags: OPENBSD_4_4_BASE
# 1.33 22-Jul-2008 thib

change the bcachestats structures members to int64_t's and do the
printing in systat with the new print_fld_ssize() function.

"same diff I wrote" deraadt@
ok art@


# 1.32 07-Jul-2008 thib

bcachestats got bumbed too u_int64_t's and I forgot about
munging systat to handle the field with;

pointed out by mickey

ok canacar@


# 1.31 13-Jun-2008 canacar

Use refresh interval for rate calculation instead of the broken elapsed
time computation.


# 1.30 12-Jun-2008 canacar

New display engine for systat, based on pftop. Adds new views for pf
(status, state, rule, queue). While all displays work, some keyboard
comands are not implemented yet. Other features include better handling
of display resize and scrolling for long views. Committing now to fix
the remaining issues in the tree.
Testing and comments by otto@ and harding@, ok deraadt@


# 1.29 12-Jun-2008 beck

make bcachestats visible in systat io - from mickey.
ok thib@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.28 30-May-2007 otto

rename msec to the less confusing sec and improve the description in
the man page. ok dlg@ and jmc@


Revision tags: OPENBSD_4_1_BASE
# 1.27 25-Feb-2007 deraadt

use the 1 line load line from 'systat vm' on all the other displays, giving
them more room. much cleaner, and it is less code too; ok deanna


Revision tags: OPENBSD_4_0_BASE
# 1.26 29-Jun-2006 dlg

change bytes to kilobytes so i dont have to think about where megabytes
start.


# 1.25 27-Jun-2006 dlg

basically replace the iostat view with something that looks like the ifstat
view. noone seemed particularly attached to the last one, so this is
going in.

from deanna phillips


# 1.24 31-Mar-2006 deraadt

fairly simple cleanup, lots of testing done


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.23 15-Feb-2004 tedu

'split' command for iostat mode
from Pedro Martelletto <pbastos@rdc.puc-rio.br>


# 1.22 15-Feb-2004 tedu

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 tags: OPENBSD_3_4_BASE
# 1.21 03-Jun-2003 millert

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


Revision tags: OPENBSD_3_3_BASE
# 1.20 02-Feb-2003 henning

When disk activity exceeds 100kB/s divide length of bar by 10s and report
factor on RHS screen.

from netbsd (dsl@)

ok theo


# 1.19 16-Dec-2002 tdeval

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


Revision tags: OPENBSD_3_2_BASE
# 1.18 18-Jun-2002 deraadt

ANSI


Revision tags: OPENBSD_3_1_BASE
# 1.17 16-Feb-2002 millert

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.


# 1.16 07-Dec-2001 deraadt

move back. pvalchev -- the bug was quite obscure


# 1.15 07-Dec-2001 pvalchev

back out latest changes which cause problems on alpha/sparc64 until
they are fixed


# 1.14 23-Nov-2001 deraadt

fix signal races. use sysctl() instead of kvm where possible, and then KNF
the hell out of it; checked by miod


# 1.13 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.12 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.11 07-Jul-2000 deraadt

fixed formatting in numlabels; danh


Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.10 19-Dec-1997 deraadt

bye bye sprintf


Revision tags: OPENBSD_2_2_BASE
# 1.9 15-Jul-1997 kstailey

initxxx() routines return 1 on success, not zero.
(ob-theo-style-commit-comment: "Argh! *sigh* not-nice!")


# 1.8 23-Jun-1997 millert

Cleanup by Theo and myself. CMDLINE changed to long to make
command line work on 64bit platforms. This is somewhat bogus
and is really just a temporary workaround (there may be a curses bug).


Revision tags: OPENBSD_2_1_BASE
# 1.7 04-Feb-1997 kstailey

display CPU stats on iostat screen even if diskless


# 1.6 06-Jan-1997 maja

Allow device names to be four characters (eg mcd0 or acd0). -moj


Revision tags: OPENBSD_2_0_BASE
# 1.5 26-Jun-1996 deraadt

rcsid


# 1.4 02-Jun-1996 mickey

it compiles w/ new curses


# 1.3 22-May-1996 deraadt

libutil


# 1.2 27-Mar-1996 niklas

From NetBSD: merge of 960317


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.48 08-May-2019 tedu

allow switching to print stats since boot via 'b'.
ok beck deraadt


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.47 16-Apr-2017 beck

Statistics for high memory flips in the buffer cache
nits from deraadt@
ok krw@ guenther@ kettenis@


# 1.46 02-Apr-2017 beck

Make dma range buffer cache pages visible in systat io
ok deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.45 16-Jan-2015 deraadt

first batch of programs adapting to the namespace cleanup
(pfvar.h nameser.h proc.h ucred.h)
ok guenther millert, and some review from doug as well.


# 1.44 23-Nov-2014 guenther

<sys/buf.h> isn't actually needed here

ok tedu@


# 1.43 15-Sep-2014 miod

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 tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.42 09-Jul-2013 beck

back out the cache flipper temporarily to work out of tree.
will come back soon.
ok deraadt@


# 1.41 11-Jun-2013 beck

High memory page flipping for the buffer cache.

This change splits the buffer cache free lists into lists of dma reachable
buffers and high memory buffers based on the ranges returned by pmemrange.
Buffers move from dma to high memory as they age, but are flipped to dma
reachable memory if IO is needed to/from and high mem buffer. The total
amount of buffers allocated is now bufcachepercent of both the dma and
the high memory region.

This change allows the use of large buffer caches on amd64 using more than
4 GB of memory

ok tedu@ krw@ - testing by many.


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.40 19-Sep-2011 beck

clean up buffer cache statistics somewhat to
remove some now useless statistics, and add some
relevant ones regarding kva usage in the cache.

make systat io and show bcstats in ddb both show
these counters.

ok deraadt@ krw@


Revision tags: OPENBSD_5_0_BASE
# 1.39 06-Jul-2011 beck

add a couple of fields needed for buffer flipping, and change systat to
show useful info in systat io instead of goo


# 1.38 02-Mar-2011 jasper

- use a common FIELD_ADDR macro, instead of rolling 78 identical copies.

ok canacar@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.37 09-Aug-2009 art

Show the busy and mapped pages in iostat.


Revision tags: OPENBSD_4_6_BASE
# 1.36 06-Jun-2009 jasper

- remove unused macro from iostat.c
- minor space nit in engine.c

ok canacar@


Revision tags: OPENBSD_4_5_BASE
# 1.35 07-Dec-2008 canacar

Warning cleanup including unused variables and shadowed names


# 1.34 01-Dec-2008 naddy

Add a function to print a floating point field and use this to fix the
SEConds field in the iostat view.
ok and help canacar@


Revision tags: OPENBSD_4_4_BASE
# 1.33 22-Jul-2008 thib

change the bcachestats structures members to int64_t's and do the
printing in systat with the new print_fld_ssize() function.

"same diff I wrote" deraadt@
ok art@


# 1.32 07-Jul-2008 thib

bcachestats got bumbed too u_int64_t's and I forgot about
munging systat to handle the field with;

pointed out by mickey

ok canacar@


# 1.31 13-Jun-2008 canacar

Use refresh interval for rate calculation instead of the broken elapsed
time computation.


# 1.30 12-Jun-2008 canacar

New display engine for systat, based on pftop. Adds new views for pf
(status, state, rule, queue). While all displays work, some keyboard
comands are not implemented yet. Other features include better handling
of display resize and scrolling for long views. Committing now to fix
the remaining issues in the tree.
Testing and comments by otto@ and harding@, ok deraadt@


# 1.29 12-Jun-2008 beck

make bcachestats visible in systat io - from mickey.
ok thib@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.28 30-May-2007 otto

rename msec to the less confusing sec and improve the description in
the man page. ok dlg@ and jmc@


Revision tags: OPENBSD_4_1_BASE
# 1.27 25-Feb-2007 deraadt

use the 1 line load line from 'systat vm' on all the other displays, giving
them more room. much cleaner, and it is less code too; ok deanna


Revision tags: OPENBSD_4_0_BASE
# 1.26 29-Jun-2006 dlg

change bytes to kilobytes so i dont have to think about where megabytes
start.


# 1.25 27-Jun-2006 dlg

basically replace the iostat view with something that looks like the ifstat
view. noone seemed particularly attached to the last one, so this is
going in.

from deanna phillips


# 1.24 31-Mar-2006 deraadt

fairly simple cleanup, lots of testing done


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.23 15-Feb-2004 tedu

'split' command for iostat mode
from Pedro Martelletto <pbastos@rdc.puc-rio.br>


# 1.22 15-Feb-2004 tedu

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 tags: OPENBSD_3_4_BASE
# 1.21 03-Jun-2003 millert

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


Revision tags: OPENBSD_3_3_BASE
# 1.20 02-Feb-2003 henning

When disk activity exceeds 100kB/s divide length of bar by 10s and report
factor on RHS screen.

from netbsd (dsl@)

ok theo


# 1.19 16-Dec-2002 tdeval

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


Revision tags: OPENBSD_3_2_BASE
# 1.18 18-Jun-2002 deraadt

ANSI


Revision tags: OPENBSD_3_1_BASE
# 1.17 16-Feb-2002 millert

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.


# 1.16 07-Dec-2001 deraadt

move back. pvalchev -- the bug was quite obscure


# 1.15 07-Dec-2001 pvalchev

back out latest changes which cause problems on alpha/sparc64 until
they are fixed


# 1.14 23-Nov-2001 deraadt

fix signal races. use sysctl() instead of kvm where possible, and then KNF
the hell out of it; checked by miod


# 1.13 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.12 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.11 07-Jul-2000 deraadt

fixed formatting in numlabels; danh


Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.10 19-Dec-1997 deraadt

bye bye sprintf


Revision tags: OPENBSD_2_2_BASE
# 1.9 15-Jul-1997 kstailey

initxxx() routines return 1 on success, not zero.
(ob-theo-style-commit-comment: "Argh! *sigh* not-nice!")


# 1.8 23-Jun-1997 millert

Cleanup by Theo and myself. CMDLINE changed to long to make
command line work on 64bit platforms. This is somewhat bogus
and is really just a temporary workaround (there may be a curses bug).


Revision tags: OPENBSD_2_1_BASE
# 1.7 04-Feb-1997 kstailey

display CPU stats on iostat screen even if diskless


# 1.6 06-Jan-1997 maja

Allow device names to be four characters (eg mcd0 or acd0). -moj


Revision tags: OPENBSD_2_0_BASE
# 1.5 26-Jun-1996 deraadt

rcsid


# 1.4 02-Jun-1996 mickey

it compiles w/ new curses


# 1.3 22-May-1996 deraadt

libutil


# 1.2 27-Mar-1996 niklas

From NetBSD: merge of 960317


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_2_BASE
# 1.47 16-Apr-2017 beck

Statistics for high memory flips in the buffer cache
nits from deraadt@
ok krw@ guenther@ kettenis@


# 1.46 02-Apr-2017 beck

Make dma range buffer cache pages visible in systat io
ok deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.45 16-Jan-2015 deraadt

first batch of programs adapting to the namespace cleanup
(pfvar.h nameser.h proc.h ucred.h)
ok guenther millert, and some review from doug as well.


# 1.44 23-Nov-2014 guenther

<sys/buf.h> isn't actually needed here

ok tedu@


# 1.43 15-Sep-2014 miod

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 tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.42 09-Jul-2013 beck

back out the cache flipper temporarily to work out of tree.
will come back soon.
ok deraadt@


# 1.41 11-Jun-2013 beck

High memory page flipping for the buffer cache.

This change splits the buffer cache free lists into lists of dma reachable
buffers and high memory buffers based on the ranges returned by pmemrange.
Buffers move from dma to high memory as they age, but are flipped to dma
reachable memory if IO is needed to/from and high mem buffer. The total
amount of buffers allocated is now bufcachepercent of both the dma and
the high memory region.

This change allows the use of large buffer caches on amd64 using more than
4 GB of memory

ok tedu@ krw@ - testing by many.


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.40 19-Sep-2011 beck

clean up buffer cache statistics somewhat to
remove some now useless statistics, and add some
relevant ones regarding kva usage in the cache.

make systat io and show bcstats in ddb both show
these counters.

ok deraadt@ krw@


Revision tags: OPENBSD_5_0_BASE
# 1.39 06-Jul-2011 beck

add a couple of fields needed for buffer flipping, and change systat to
show useful info in systat io instead of goo


# 1.38 02-Mar-2011 jasper

- use a common FIELD_ADDR macro, instead of rolling 78 identical copies.

ok canacar@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.37 09-Aug-2009 art

Show the busy and mapped pages in iostat.


Revision tags: OPENBSD_4_6_BASE
# 1.36 06-Jun-2009 jasper

- remove unused macro from iostat.c
- minor space nit in engine.c

ok canacar@


Revision tags: OPENBSD_4_5_BASE
# 1.35 07-Dec-2008 canacar

Warning cleanup including unused variables and shadowed names


# 1.34 01-Dec-2008 naddy

Add a function to print a floating point field and use this to fix the
SEConds field in the iostat view.
ok and help canacar@


Revision tags: OPENBSD_4_4_BASE
# 1.33 22-Jul-2008 thib

change the bcachestats structures members to int64_t's and do the
printing in systat with the new print_fld_ssize() function.

"same diff I wrote" deraadt@
ok art@


# 1.32 07-Jul-2008 thib

bcachestats got bumbed too u_int64_t's and I forgot about
munging systat to handle the field with;

pointed out by mickey

ok canacar@


# 1.31 13-Jun-2008 canacar

Use refresh interval for rate calculation instead of the broken elapsed
time computation.


# 1.30 12-Jun-2008 canacar

New display engine for systat, based on pftop. Adds new views for pf
(status, state, rule, queue). While all displays work, some keyboard
comands are not implemented yet. Other features include better handling
of display resize and scrolling for long views. Committing now to fix
the remaining issues in the tree.
Testing and comments by otto@ and harding@, ok deraadt@


# 1.29 12-Jun-2008 beck

make bcachestats visible in systat io - from mickey.
ok thib@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.28 30-May-2007 otto

rename msec to the less confusing sec and improve the description in
the man page. ok dlg@ and jmc@


Revision tags: OPENBSD_4_1_BASE
# 1.27 25-Feb-2007 deraadt

use the 1 line load line from 'systat vm' on all the other displays, giving
them more room. much cleaner, and it is less code too; ok deanna


Revision tags: OPENBSD_4_0_BASE
# 1.26 29-Jun-2006 dlg

change bytes to kilobytes so i dont have to think about where megabytes
start.


# 1.25 27-Jun-2006 dlg

basically replace the iostat view with something that looks like the ifstat
view. noone seemed particularly attached to the last one, so this is
going in.

from deanna phillips


# 1.24 31-Mar-2006 deraadt

fairly simple cleanup, lots of testing done


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.23 15-Feb-2004 tedu

'split' command for iostat mode
from Pedro Martelletto <pbastos@rdc.puc-rio.br>


# 1.22 15-Feb-2004 tedu

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 tags: OPENBSD_3_4_BASE
# 1.21 03-Jun-2003 millert

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


Revision tags: OPENBSD_3_3_BASE
# 1.20 02-Feb-2003 henning

When disk activity exceeds 100kB/s divide length of bar by 10s and report
factor on RHS screen.

from netbsd (dsl@)

ok theo


# 1.19 16-Dec-2002 tdeval

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


Revision tags: OPENBSD_3_2_BASE
# 1.18 18-Jun-2002 deraadt

ANSI


Revision tags: OPENBSD_3_1_BASE
# 1.17 16-Feb-2002 millert

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.


# 1.16 07-Dec-2001 deraadt

move back. pvalchev -- the bug was quite obscure


# 1.15 07-Dec-2001 pvalchev

back out latest changes which cause problems on alpha/sparc64 until
they are fixed


# 1.14 23-Nov-2001 deraadt

fix signal races. use sysctl() instead of kvm where possible, and then KNF
the hell out of it; checked by miod


# 1.13 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.12 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.11 07-Jul-2000 deraadt

fixed formatting in numlabels; danh


Revision tags: OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.10 19-Dec-1997 deraadt

bye bye sprintf


Revision tags: OPENBSD_2_2_BASE
# 1.9 15-Jul-1997 kstailey

initxxx() routines return 1 on success, not zero.
(ob-theo-style-commit-comment: "Argh! *sigh* not-nice!")


# 1.8 23-Jun-1997 millert

Cleanup by Theo and myself. CMDLINE changed to long to make
command line work on 64bit platforms. This is somewhat bogus
and is really just a temporary workaround (there may be a curses bug).


Revision tags: OPENBSD_2_1_BASE
# 1.7 04-Feb-1997 kstailey

display CPU stats on iostat screen even if diskless


# 1.6 06-Jan-1997 maja

Allow device names to be four characters (eg mcd0 or acd0). -moj


Revision tags: OPENBSD_2_0_BASE
# 1.5 26-Jun-1996 deraadt

rcsid


# 1.4 02-Jun-1996 mickey

it compiles w/ new curses


# 1.3 22-May-1996 deraadt

libutil


# 1.2 27-Mar-1996 niklas

From NetBSD: merge of 960317


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision