OpenBSD CVS

CVS log for src/usr.bin/systat/vmstat.c


[BACK] Up to [local] / src / usr.bin / systat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.96 / (download) - annotate - [select for diffs], Wed Dec 28 20:49:05 2022 UTC (16 months, 2 weeks ago) by cheloha
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.95: +5 -7 lines
Diff to previous 1.95 (colored)

systat(1): vmstat: dinfo(): compute rates using real elapsed time

The "naptime" value is not the real elapsed time.  But showkre() has
the real elapsed time, "etime", so pass that as argument to dinfo().

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

ok millert@

Revision 1.95 / (download) - annotate - [select for diffs], Sun Dec 4 18:01:57 2022 UTC (17 months, 2 weeks ago) by cheloha
Branch: MAIN
Changes since 1.94: +9 -18 lines
Diff to previous 1.94 (colored)

systat(1): vmstat: measure elapsed time with clock_gettime(2) instead of ticks

The vmstat view in systat(1) should not use statclock() ticks to count
elapsed time.  First, ticks are low resolution.  Second, the statclock
is sometimes randomized, so each tick is not necessarily of equal
length.  Third, we're counting ticks from every CPU on the system, so
every rate in the view is divided by the number of CPUs.  For example,
on an amd64 system with 8 CPUs you currently see:

     200 clock

... when the true clock interrupt rate on that system is 1600.

Instead, measure elapsed time with clock_gettime(2).  Use CLOCK_UPTIME
here so we exclude time when the system is suspended.  With this
change we no longer need "stathz" or "hertz".  We can also get rid of
the anachronistic secondary clock failure test.

Prompted by dlg@ and jmatthew@.  deraadt@ says this has been in snaps
since 2022-11-21; no complaints.

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

ok dlg@ deraadt@

Revision 1.94 / (download) - annotate - [select for diffs], Tue Feb 22 17:35:01 2022 UTC (2 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.93: +1 -2 lines
Diff to previous 1.93 (colored)

MAXCOMLEN is no longer needed in these programs, so remove the annotation
from sys/param.h include lines, or remove the include lines entirely if
it this was the least requirement.
ok millert

Revision 1.93 / (download) - annotate - [select for diffs], Tue Feb 22 03:33:12 2022 UTC (2 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.92: +2 -1 lines
Diff to previous 1.92 (colored)

need a local nitems() definition

Revision 1.92 / (download) - annotate - [select for diffs], Sun Feb 20 00:09:29 2022 UTC (2 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.91: +2 -1 lines
Diff to previous 1.91 (colored)

sys/proc.h requires sys/signal.h (will become visible when sys/param.h
is removed)

Revision 1.91 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:04 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.90: +9 -9 lines
Diff to previous 1.90 (colored)

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.

Revision 1.90 / (download) - annotate - [select for diffs], Sun Jan 20 03:53:03 2019 UTC (5 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.89: +5 -3 lines
Diff to previous 1.89 (colored)

don't reuse global between functions; the value is wrong.
reported by Bryan Linton

Revision 1.89 / (download) - annotate - [select for diffs], Sat Nov 17 23:10:08 2018 UTC (5 years, 6 months ago) by cheloha
Branch: MAIN
Changes since 1.88: +30 -13 lines
Diff to previous 1.88 (colored)

Add new KERN_CPUSTATS sysctl(2) so we can identify offline CPUs.

Because of hw.smt we need a way to determine whether a given CPU is "online"
or "offline" from userspace.  KERN_CPTIME2 is an array, and so cannot be
cleanly extended for this purpose, so add a new sysctl(2) KERN_CPUSTATS
with an extensible struct.  At the moment it's just KERN_CPTIME2 with a
flags member, but it can grow as needed.

KERN_CPUSTATS appears to have been defined by BSDi long ago, but there are
few (if any) packages in the wild still using the symbol so breakage in ports
should be near zero.  No other system inherited the symbol from BSDi, either.

Then, use the new sysctl(2) in systat(1) and top(1):

  - systat(1) draws placeholder marks ('-') instead of percentages for
    offline CPUs in the cpu view.

  - systat(1) omits offline CPU ticks when drawing the "big bar" in
    the vmstat view.  The upshot is that the bar isn't half idle when
    half your logical CPUs are disabled.

  - top(1) does not draw lines for offline CPUs; if CPUs toggle on or
    offline in interactive mode we redraw the display to expand/reduce
    space for the new/missing CPUs.  This is consistent with what some
    top(1) implementations do on Linux.

  - top(1) omits offline CPUs from the totals when CPU totals are
    combined into a single line (the '-1' flag).

Originally prompted by deraadt@.  Discussed endlessly with deraadt@,
ketennis@, and sthen@.  Tested by jmc@ and jca@.  Earlier versions also
discussed with jca@.  Earlier versions tested by jmc@, tb@, and many
others.

docs ok jmc@, kernel bits ok ketennis@, everything ok sthen@,
"Is your stuff in yet?" deraadt@

Revision 1.88 / (download) - annotate - [select for diffs], Fri Oct 5 18:56:57 2018 UTC (5 years, 7 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.87: +6 -25 lines
Diff to previous 1.87 (colored)

Revert KERN_CPTIME2 ENODEV changes in kernel and userspace.

ok kettenis deraadt

Revision 1.87 / (download) - annotate - [select for diffs], Wed Sep 26 17:23:13 2018 UTC (5 years, 7 months ago) by cheloha
Branch: MAIN
Changes since 1.86: +26 -7 lines
Diff to previous 1.86 (colored)

KERN_CPTIME2: set ENODEV if the CPU is offline.

This lets userspace distinguish between idle CPUs and those that are
not schedulable because hw.smt=0.

A subsequent commit probably needs to add documentation for this
to sysctl.2 (and perhaps elsewhere) after the dust settles.

Also included here are changes to systat(1) and top(1) that account
for the ENODEV case and adjust behavior accordingly:

 - systat(1)'s cpu view prints placeholder marks ('-') instead of
   percentages for each state if the given CPU is offline.

 - systat(1)'s vmstat view checks for offline CPUs when computing the
   machine state total and excludes them, so the CPU usage graph
   only represents the states for online CPUs.

 - top(1) does not draw CPU rows for offline CPUs when the view is
   redrawn.  If CPUs "go offline", percentages for each state are
   replaced by placeholder marks ('-'); the view will need to be
   redrawn to remove these rows.  If CPUs "go online" the view will
   need to be redrawn to show these new CPUs.  In "combined CPU" mode,
   the count and the state totals only represent online CPUs.

Ports using KERN_CPTIME2 will need to be updated.  The changes
described above to make systat(1) and top(1) aware of the ENODEV
case *and* gracefully handle a changing HW_NCPUONLINE while the
application is running are not necessarily appropriate for each
and every port.

The changes described above are so extensive in part to demonstrate
one way a program *might* be made robust to changing CPU availability.
In particular, changing hw.smt after boot is an extremely rare event,
and this needs to be weighed when updating ports.

The logic needed to account for the KERN_CPTIME2 ENODEV case is
very roughly:

	if (sysctl(...) == -1) {
		if (errno != ENODEV) {
			/* Actual error occurred. */
		} else {
			/* CPU is offline. */
		}
	} else {
		/* CPU is online and CPU states were set by sysctl(2). */
	}

Prompted by deraadt@.  Basic idea for ENODEV from kettenis@.  Discussed at
length with kettenis@.  Additional testing by tb@.

No complaints from hackers@ after a week.

ok kettenis@, "I think you should commit [now]" deraadt@

Revision 1.86 / (download) - annotate - [select for diffs], Fri Jun 22 14:22:06 2018 UTC (5 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.85: +24 -19 lines
Diff to previous 1.85 (colored)

Constrain IPKTS/OPKTS from floating down beyond the rest of the
displayed lines. Makes vmstat view in tall windows easier to read.

ok sthen@

Revision 1.85 / (download) - annotate - [select for diffs], Sat May 19 13:24:10 2018 UTC (6 years ago) by bluhm
Branch: MAIN
Changes since 1.84: +6 -4 lines
Diff to previous 1.84 (colored)

Do not ignore nice time in systat(1).  The sum would not be 100%,
a busy machine would look idle.  As %Nic does not fit in the columns,
add it to %Usr.  Introduce @ for spinning time to keep the characters
people are used to.  Put %Spn between %Int and %Sys like in top.
OK visa@ mpi@

Revision 1.84 / (download) - annotate - [select for diffs], Mon May 14 12:31:21 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.83: +5 -5 lines
Diff to previous 1.83 (colored)

Stopping counting and reporting CPU time spent spinning on a lock as
system time.

Introduce a new CP_SPIN "scheduler state" and modify userland tools
to display the % of timer a CPU spents spinning.

Based on a diff from jmatthew@, ok pirofti@, bluhm@, visa@, deraadt@

Revision 1.83 / (download) - annotate - [select for diffs], Thu May 3 07:49:18 2018 UTC (6 years ago) by otto
Branch: MAIN
Changes since 1.82: +4 -2 lines
Diff to previous 1.82 (colored)

test for failing allocation using the standard idiom; prompted by Nan Xiao
ok tb@

Revision 1.82 / (download) - annotate - [select for diffs], Sun Dec 18 23:36:32 2016 UTC (7 years, 5 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.81: +4 -4 lines
Diff to previous 1.81 (colored)

Remove statements that have no effect from X(), Y() and Z() #define's.
Leftovers from the re-engining of systat eight years ago. Makes gcc
quieter.

ok otto@ deraadt@

Revision 1.81 / (download) - annotate - [select for diffs], Wed Aug 24 03:13:45 2016 UTC (7 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.80: +9 -9 lines
Diff to previous 1.80 (colored)

Convert quad_t to int64_t and %q to %ll
Convert bzero() to memset() and bcopy() to memcpy()

ok natano@ millert@

Revision 1.80 / (download) - annotate - [select for diffs], Thu Aug 20 22:32:42 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert

Revision 1.79 / (download) - annotate - [select for diffs], Fri Jan 16 00:03:38 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.78: +8 -5 lines
Diff to previous 1.78 (colored)

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.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Nov 23 04:34:48 2014 UTC (9 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.77: +1 -2 lines
Diff to previous 1.77 (colored)

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

ok tedu@

Revision 1.77 / (download) - annotate - [select for diffs], Mon Sep 15 19:08:21 2014 UTC (9 years, 8 months ago) by miod
Branch: MAIN
Changes since 1.76: +5 -6 lines
Diff to previous 1.76 (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.76 / (download) - annotate - [select for diffs], Tue Apr 8 14:04:11 2014 UTC (10 years, 1 month ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.75: +2 -3 lines
Diff to previous 1.75 (colored)

Use VM_UVMEXP instead of VM_METER for memory usages and directly
include <sys/vmmeter.h> where it is needed instead of relying on
it being included by <uvm/uvm_extern.h>.

miod@ likes it, ok guenther@

Revision 1.75 / (download) - annotate - [select for diffs], Thu Oct 31 02:00:11 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.74: +3 -2 lines
Diff to previous 1.74 (colored)

sometimes we find .h we no longer need

Revision 1.74 / (download) - annotate - [select for diffs], Tue May 14 20:39:25 2013 UTC (11 years ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.73: +1 -3 lines
Diff to previous 1.73 (colored)

Don't display swapin/swapout uvmexp fields

Revision 1.73 / (download) - annotate - [select for diffs], Fri Nov 19 18:35:16 2010 UTC (13 years, 6 months ago) by mikeb
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.72: +2 -11 lines
Diff to previous 1.72 (colored)

Make KERN_CPTIME return an avarage number of ticks across all CPUs
tedu agreed with an idea, tested by Luis Useche and me; ok deraadt

Revision 1.72 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:44 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.71: +1 -8 lines
Diff to previous 1.71 (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.71 / (download) - annotate - [select for diffs], Fri Aug 14 14:41:55 2009 UTC (14 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.70: +6 -10 lines
Diff to previous 1.70 (colored)

tie IPKTS/OPKTS to bottom corner for smaller screens

Revision 1.70 / (download) - annotate - [select for diffs], Thu Aug 13 23:45:35 2009 UTC (14 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.69: +14 -2 lines
Diff to previous 1.69 (colored)

there are louder and louder moans about the inability to see packet
rates at the same time as interrupt counts, so sneak them into the
bottom corner of the vmstat screen
ok dlg

Revision 1.69 / (download) - annotate - [select for diffs], Sun May 3 05:01:54 2009 UTC (15 years ago) by drahn
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.68: +4 -4 lines
Diff to previous 1.68 (colored)

Hinge at the natural rollover point 9999x instead of 1024x when switching to
the next unit K->M->G. ok deraadt@

Revision 1.68 / (download) - annotate - [select for diffs], Mon Mar 30 05:35:22 2009 UTC (15 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.67: +30 -4 lines
Diff to previous 1.67 (colored)

allow the disk transfer speed numbers to show useable numbers when disks
get really fast; ok canacar

Revision 1.67 / (download) - annotate - [select for diffs], Sun Dec 7 02:56:06 2008 UTC (15 years, 5 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.66: +28 -28 lines
Diff to previous 1.66 (colored)

Warning cleanup including unused variables and shadowed names

Revision 1.66 / (download) - annotate - [select for diffs], Sat Nov 1 00:56:25 2008 UTC (15 years, 6 months ago) by canacar
Branch: MAIN
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)

Improve reporting of cache misses in the vmstat view. Previously
the misses field may report negative values. The hit/miss numbers
does not exactly reflect the statistics collected by the kernel
but this is close enough.

Report & patch from Bjorn Anderss, input from beck@ and thib@

Revision 1.65 / (download) - annotate - [select for diffs], Fri Jun 13 10:06:14 2008 UTC (15 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.64: +3 -4 lines
Diff to previous 1.64 (colored)

compile on older gcc; no decl after code

Revision 1.64 / (download) - annotate - [select for diffs], Thu Jun 12 22:26:01 2008 UTC (15 years, 11 months ago) by canacar
Branch: MAIN
Changes since 1.63: +81 -38 lines
Diff to previous 1.63 (colored)

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@

Revision 1.63 / (download) - annotate - [select for diffs], Sat Sep 1 19:32:19 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

malloc(n * m) -> calloc(n, m); from zinovik

Revision 1.62 / (download) - annotate - [select for diffs], Sun Feb 25 18:21:24 2007 UTC (17 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.61: +11 -48 lines
Diff to previous 1.61 (colored)

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 1.61 / (download) - annotate - [select for diffs], Mon Nov 13 19:03:51 2006 UTC (17 years, 6 months ago) by otto
Branch: MAIN
Changes since 1.60: +6 -4 lines
Diff to previous 1.60 (colored)

fix macro abuse leading to stray numbers in the vm display.
ok a whole lot of devs@

Revision 1.60 / (download) - annotate - [select for diffs], Fri Apr 14 01:14:56 2006 UTC (18 years, 1 month ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.59: +2 -15 lines
Diff to previous 1.59 (colored)

remove comments that says we dont count intr time and remove some code that
fudges the output to stay clean when intr time wasnt shown. not needed
since we show it now.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Apr 14 01:08:15 2006 UTC (18 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.58: +7 -11 lines
Diff to previous 1.58 (colored)

show cpu time spent in interrupts. ive been wanting this for years.

tweaks by deraadt@ ok by many

Revision 1.58 / (download) - annotate - [select for diffs], Fri Mar 31 18:19:44 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

spacing

Revision 1.57 / (download) - annotate - [select for diffs], Fri Mar 31 04:10:59 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.56: +8 -8 lines
Diff to previous 1.56 (colored)

fairly simple cleanup, lots of testing done

Revision 1.56 / (download) - annotate - [select for diffs], Tue Mar 28 09:03:46 2006 UTC (18 years, 1 month ago) by mickey
Branch: MAIN
Changes since 1.55: +11 -11 lines
Diff to previous 1.55 (colored)

give more space to the memory columns in vm page; deraadt@ ok

Revision 1.55 / (download) - annotate - [select for diffs], Wed Sep 28 00:24:04 2005 UTC (18 years, 7 months ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.54: +7 -3 lines
Diff to previous 1.54 (colored)

- when we run out of static kernel map entries, grab a fresh page using
  the uvm_km_page allocator and use it instead of calling panic()
- add a counter to uvmexp so we can keep track of how many map entries
  we have in use

idea from tedu@, long ago, okay deraadt@

Revision 1.54 / (download) - annotate - [select for diffs], Mon Apr 4 08:54:33 2005 UTC (19 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.53: +2 -3 lines
Diff to previous 1.53 (colored)

nlist.h not needed

Revision 1.53 / (download) - annotate - [select for diffs], Thu Sep 23 21:10:21 2004 UTC (19 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.52: +39 -13 lines
Diff to previous 1.52 (colored)

adapt to KERN_INTRCNT_CNT returning a quad, from danh (imported now to
avoid tree breakage)

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jul 9 16:32:54 2004 UTC (19 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.51: +2 -25 lines
Diff to previous 1.51 (colored)

remove post-mortem stuff (sysctl only here)

Revision 1.51 / (download) - annotate - [select for diffs], Mon Jun 28 01:45:51 2004 UTC (19 years, 10 months ago) by aaron
Branch: MAIN
Changes since 1.50: +51 -141 lines
Diff to previous 1.50 (colored)

Remove special #if defined(__i386__) code from systat and vmstat.  We now use
sysctl to fetch interrupt counters on all architectures.  Also add new '-z'
flag to vmstat which means show all devices, even those that have not yet
generated an interrupt.  deraadt@ tholo@ drahn@ millert@ ok

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jun 11 06:31:32 2004 UTC (19 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.49: +11 -1 lines
Diff to previous 1.49 (colored)

divide etime by ncpu

Revision 1.49 / (download) - annotate - [select for diffs], Fri Jun 11 06:30:31 2004 UTC (19 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored)

oops

Revision 1.48 / (download) - annotate - [select for diffs], Fri Jun 11 05:55:43 2004 UTC (19 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.47: +48 -2 lines
Diff to previous 1.47 (colored)

on i386 machines, attempt to peek inside apic_intrhand[] as well, so that
MP machines get interrupt counters.  will be replaced by a MI subsystem
one day.  most code from drahn, few final bugs fixed by me

Revision 1.47 / (download) - annotate - [select for diffs], Sat May 22 18:06:12 2004 UTC (20 years ago) by henning
Branch: MAIN
Changes since 1.46: +4 -4 lines
Diff to previous 1.46 (colored)

with modern disks data transfers rates above 10000 kByte/s are seen
regularily, make the disk columns a little wider so it doesn't run into
the neighboring column, theo ok

Revision 1.46 / (download) - annotate - [select for diffs], Fri Apr 23 04:15:27 2004 UTC (20 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.45: +9 -4 lines
Diff to previous 1.45 (colored)

don't print stats until they're stable, prevents seeing weird stuff in
disk columns.  tested by jolan@.  from pedro martelletto

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

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

Revision 1.44 / (download) - annotate - [select for diffs], Sun Feb 15 02:45:47 2004 UTC (20 years, 3 months ago) by tedu
Branch: MAIN
Changes since 1.43: +6 -4 lines
Diff to previous 1.43 (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.43 / (download) - annotate - [select for diffs], Thu Oct 16 07:09:09 2003 UTC (20 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

duh

Revision 1.42 / (download) - annotate - [select for diffs], Wed Oct 15 20:01:32 2003 UTC (20 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.41: +6 -2 lines
Diff to previous 1.41 (colored)

also print the  uvmexp.zeropages if there is space in vm screen

Revision 1.41 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:17 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.40: +3 -7 lines
Diff to previous 1.40 (colored)

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

Revision 1.40 / (download) - annotate - [select for diffs], Mon Apr 14 04:45:45 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.39: +2 -3 lines
Diff to previous 1.39 (colored)

remove old comment

Revision 1.39 / (download) - annotate - [select for diffs], Tue Apr 8 00:53:09 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.38: +7 -6 lines
Diff to previous 1.38 (colored)

string cleaning; ok tdeval

Revision 1.38 / (download) - annotate - [select for diffs], Fri Feb 28 21:29:07 2003 UTC (21 years, 2 months ago) by jason
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.37: +7 -7 lines
Diff to previous 1.37 (colored)

intrcnt's are ints not longs (at least according to the new kern.intrcnt stuff)

Revision 1.37 / (download) - annotate - [select for diffs], Mon Dec 16 01:57:04 2002 UTC (21 years, 5 months ago) by tdeval
Branch: MAIN
Changes since 1.36: +6 -6 lines
Diff to previous 1.36 (colored)

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

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jun 19 08:45:52 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.35: +7 -7 lines
Diff to previous 1.35 (colored)

mark which nlist[] kmem entries are not needed in the sysctl case, and which are

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jun 18 00:46:48 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.34: +27 -40 lines
Diff to previous 1.34 (colored)

ANSI

Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 29 17:28:12 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Fix 32bit int oflow when there is > 2GB vm; peters AT telia DOT net

Revision 1.33 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:54 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.32: +10 -10 lines
Diff to previous 1.32 (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.32 / (download) - annotate - [select for diffs], Sat Feb 16 00:18:09 2002 UTC (22 years, 3 months ago) by tdeval
Branch: MAIN
Changes since 1.31: +23 -22 lines
Diff to previous 1.31 (colored)

Some disk names are longer than 4.  Cope with that.
ok deraadt@

Revision 1.31 / (download) - annotate - [select for diffs], Fri Dec 7 09:18:08 2001 UTC (22 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +53 -55 lines
Diff to previous 1.30 (colored)

move back.  pvalchev -- the bug was quite obscure

Revision 1.30 / (download) - annotate - [select for diffs], Fri Dec 7 07:57:36 2001 UTC (22 years, 5 months ago) by pvalchev
Branch: MAIN
Changes since 1.29: +53 -49 lines
Diff to previous 1.29 (colored)

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

Revision 1.29 / (download) - annotate - [select for diffs], Fri Nov 23 22:20:06 2001 UTC (22 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.28: +51 -55 lines
Diff to previous 1.28 (colored)

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

Revision 1.28 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:16 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
Changes since 1.27: +6 -6 lines
Diff to previous 1.27 (colored)

kill more registers

millert@ ok

Revision 1.27 / (download) - annotate - [select for diffs], Sun Nov 18 23:56:49 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +11 -11 lines
Diff to previous 1.26 (colored)

slightly expand the Csw/Trp/Sys/Int/Sof spacing

Revision 1.26 / (download) - annotate - [select for diffs], Tue Nov 6 19:20:15 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
Changes since 1.25: +2 -3 lines
Diff to previous 1.25 (colored)

New vm includes.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Aug 28 05:17:55 2001 UTC (22 years, 8 months ago) by weingart
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.24: +13 -8 lines
Diff to previous 1.24 (colored)

Add information on number/percentage of namei calls missed the cache.
millert@ ok.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jun 27 06:16:49 2001 UTC (22 years, 10 months ago) by art
Branch: MAIN
Changes since 1.23: +2 -113 lines
Diff to previous 1.23 (colored)

UVM is no longer an option

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jun 22 14:57:21 2001 UTC (22 years, 11 months ago) by lebel
Branch: MAIN
Changes since 1.22: +3 -4 lines
Diff to previous 1.22 (colored)

use strlcpy vs strncpy+a[len-1]='\0'

Revision 1.22 / (download) - annotate - [select for diffs], Fri May 4 16:48:34 2001 UTC (23 years ago) by ericj
Branch: MAIN
Changes since 1.21: +6 -6 lines
Diff to previous 1.21 (colored)


handle kvm_nlist() failing, from pr#1798.
Patch similar to the one submitted by <peterw@documenta.com.au>

Revision 1.21 / (download) - annotate - [select for diffs], Tue Feb 22 21:24:02 2000 UTC (24 years, 3 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
Changes since 1.20: +8 -10 lines
Diff to previous 1.20 (colored)

_total is no longer a symbol in the kernel

Revision 1.20 / (download) - annotate - [select for diffs], Tue Oct 26 15:43:22 1999 UTC (24 years, 6 months ago) by art
Branch: MAIN
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (colored)

Fix printing of interrupts with UVM.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Oct 26 15:13:54 1999 UTC (24 years, 6 months ago) by art
Branch: MAIN
Changes since 1.18: +118 -8 lines
Diff to previous 1.18 (colored)

support UVM. (much code from NetBSD)

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jun 16 10:18:30 1999 UTC (24 years, 11 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.17: +7 -7 lines
Diff to previous 1.17 (colored)

Fixed i386 -> __i386__

Revision 1.17 / (download) - annotate - [select for diffs], Sat Dec 19 06:34:22 1998 UTC (25 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored)

move Act Free field over one

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jul 13 02:11:42 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

ftpd: sleep for an indeterminate amount for non-existant logins
      to simulate a crypt, like login does.
Use SEEK_* not L_* and kill some 0L's used in lseek while we're there.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jun 12 22:09:23 1998 UTC (25 years, 11 months ago) by marc
Branch: MAIN
Changes since 1.14: +12 -2 lines
Diff to previous 1.14 (colored)

fix vm load display

Revision 1.14 / (download) - annotate - [select for diffs], Fri Dec 19 09:34:46 1997 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

comment this strncpy is safe

Revision 1.13 / (download) - annotate - [select for diffs], Fri Dec 19 09:22:56 1997 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 (colored)

proactive buffer blocks

Revision 1.12 / (download) - annotate - [select for diffs], Fri Dec 19 09:03:34 1997 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

bye bye sprintf

Revision 1.11 / (download) - annotate - [select for diffs], Mon Nov 24 16:19:42 1997 UTC (26 years, 5 months ago) by kstailey
Branch: MAIN
Changes since 1.10: +4 -3 lines
Diff to previous 1.10 (colored)

Deal with the fact that PUTRATE() is a macro that contains braces by
surrounding it with braces after an ``if ()''.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Nov 22 20:07:56 1997 UTC (26 years, 6 months ago) by mickey
Branch: MAIN
Changes since 1.9: +8 -18 lines
Diff to previous 1.9 (colored)

remove unused kernel vars

Revision 1.9 / (download) - annotate - [select for diffs], Sat Nov 22 14:19:23 1997 UTC (26 years, 6 months ago) by kstailey
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

back out 1.8, will fix in another way.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Nov 22 13:07:37 1997 UTC (26 years, 6 months ago) by kstailey
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Make vmstat mode display actually fit in 80x24.
Exploits fact that swap display is always blank.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 29 04:51:43 1997 UTC (26 years, 9 months ago) by flipk
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.6: +2 -5 lines
Diff to previous 1.6 (colored)

delete accidental #if 0

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jul 29 04:47:13 1997 UTC (26 years, 9 months ago) by flipk
Branch: MAIN
Changes since 1.5: +4 -2 lines
Diff to previous 1.5 (colored)

1) display full time string in 'vmstat' display so you can tell
   the difference between an inactive display and a hung machine.
2) Update the man page for 'vmstat' to reflect reality (and actually
   explain all those vm abbreviations).

netbsd PR bin/2756 (Jonathan Stone <jonathan@DSG.Stanford.EDU>

Revision 1.5 / (download) - annotate - [select for diffs], Fri Dec 20 00:17:29 1996 UTC (27 years, 5 months ago) by downsj
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

support four letter device names

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 26 05:40:12 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

rcsid

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jun 25 20:47:00 1996 UTC (27 years, 10 months ago) by tholo
Branch: MAIN
Changes since 1.2: +57 -0 lines
Diff to previous 1.2 (colored)

Show interrupt counts on i386.

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

libutil

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:46:10 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:46:10 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.