Commit Graph

189 Commits

Author SHA1 Message Date
Marcelo Araujo
4e7ecee633 Use nitems() from sys/param.h and also remove the cast.
Reviewed by:	markj
MFC after:	3 weeks.
Differential Revision:	https://reviews.freebsd.org/D9937
2017-03-10 04:49:40 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Mark Johnston
320ab9c026 Remove a lingering reference to cache pages from vmstat(8).
Reported by:	alc
2016-11-16 00:21:18 +00:00
Mark Johnston
cc59e3a79b Add the laundry page count to the displays of systat, top, and vmstat.
Reviewed by:	alc, kib
Differential Revision:	https://reviews.freebsd.org/D8467
2016-11-10 19:55:45 +00:00
Marcelo Araujo
ee03c16e64 Use MIN() macro from sys/param.h.
MFC after:	2 weeks.
2016-04-22 03:46:57 +00:00
Craig Rodrigues
77624aed80 Remove extraneous characters
Noticed by:     markj
Reviewed by:    allanjude
2015-12-23 07:28:48 +00:00
Allan Jude
3410663468 Some problems were introduced during the libxo-ification of vmstat, fix them
stop vmstat -i segfaulting
remove duplicate header from vmstat -i
do not pad the name of the interupt in encoded outputs
fix stray % and missing } in the header for vmstat -i
add outer container to vmstat -i
add missing xo_flush in vmstat -i (when run with an interval or delay)
add outer container to vmstat -m
do not pad the name of malloc areans
add outer container to vmstat -z
do not pad the name of memory zones

Reviewed by:	rodrigc
Approved by:	bapt (mentor)
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D4263
2015-12-01 16:31:07 +00:00
Bryan Drewery
cf990407e1 Update dependencies after r291406 added libelf to libkvm.
Unfortunately filemon/meta mode tracks all indirect dependencies here
since ld(1) is reading libelf when linking in libkvm.  Churn would be
reduced if this was able to be limited to direct dependencies.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:18:48 +00:00
Mark Johnston
f226507c00 Add a missing brace to fix vmstat -s output. 2015-11-21 23:04:12 +00:00
Craig Rodrigues
0e51ea9106 Convert vmstat to use libxo.
This patch was based on this patch:
https://github.com/Juniper/libxo/blob/master/patches/vmstat.patch

by Phil Shafer at Juniper Networks, but updated to the latest
vmstat code.

Reviewed by:           allanjude
Differential Revision: https://reviews.freebsd.org/D3935
2015-11-20 05:15:34 +00:00
Mark Johnston
d73ce4c698 Remove the v_cache_min and v_cache_max sysctls. They are unused and have
no effect.

Reviewed by:	alc
Sponsored by:	EMC / Isilon Storage Division
2015-09-11 03:00:20 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
John Baldwin
696bb6cedf Trim spurious colon. 2015-05-27 19:49:33 +00:00
John Baldwin
ff87ae350e Export a list of VM objects in the system via a sysctl. The list can be
examined via 'vmstat -o'.  It can be used to determine which files are
using physical pages of memory and how much each is using.

Differential Revision:	https://reviews.freebsd.org/D2277
Reviewed by:	alc, kib
MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc. (forward porting to HEAD/10)
2015-05-27 18:11:05 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Will Andrews
d0fde85e65 Use clock_gettime to measure the time that we spent asleep during
"vmstat -i" instead of assuming it's what we asked for.

Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1066751 on 2014/06/04
2015-01-23 16:21:31 +00:00
Will Andrews
157b158ea9 Use CLOCK_UPTIME to get the uptime instead of CLOCK_MONOTONIC.
Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1066740 on 2014/06/04
2015-01-23 16:18:39 +00:00
Will Andrews
961a5dae5c Make "vmstat -i" respect the -c <count> and -i <interval> options together.
Submitted by:	asomers
MFC after:	1 week
Sponsored by:	Spectra Logic
MFSpectraBSD:	1066735 on 2014/06/04
2015-01-23 16:15:55 +00:00
Baptiste Daroussin
3e11bd9e2a Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Kirk McKusick
24244db06b Replace update from -r271410 accidentally lost in -r273575. 2014-10-26 20:48:26 +00:00
Kirk McKusick
bcc63e8586 Fix formatting of vmstat (1) so that it looks cleaner on standard 80
column displays. In particular it wraps far less often.

Submitted by: Andy Kosela <akosela@andykosela.com>
PR:           191976
2014-10-24 04:01:14 +00:00
Hiroki Sato
83a15ccf22 Fix header output when -P is specified and (ncpus - 1) != maxid.
Reported by:	Hiroaki Shimizu
PR:		152738
2014-09-10 22:34:08 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Benjamin Kaduk
e1ba604a96 Update vmstat usage for last-argument count/wait parameters
Correct the usage in both the manpage and in usage() to indicate
that the wait interval and repetition count may be given either
with the respective -w/-c arguments, or as the final positional
arguments. [0]

The corresponding code to implement the positional arguments has
been conditional on the (always-enabled) BACKWARD_COMPATIBILITY
macro since the original 4.4-lite import.  It's no longer reasonable
to remove the functionality, so remove the macro and conditional
instead.

Note that multiple disks may be given on the command line.

While here, sort arguments and apply minor mdoc fixes.

PR:		184755 [0]
Approved by:	hrs (mentor, src committer)
2014-08-08 16:32:06 +00:00
Bryan Drewery
1d212ea524 Fix vmstat -M after r263620 renamed 'cnt' to 'vm_cnt'.
This was showing as:
  vmstat: undefined symbols:
   _cnt

To remain backwards compatible with older dumps, if 'vm_cnt' symbol is not
found then try again with 'cnt'.

Reported by:	pho
Sponsored by:	EMC / Isilon Storage Division
2014-07-11 16:45:55 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Andrey Zonov
c71535cdd3 - Show page faults requiring I/O when -s invoked.
Reviewed by:	alc
MFC after:	2 weeks
2013-01-28 12:58:37 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Sergey Kandaurov
2d780dbb4b Garbage collect defunct nlist(3) symbols.
MFC after:	1 week
2012-03-22 09:47:14 +00:00
Dimitry Andric
b7de4fa0d3 In usr.bin/vmstat/vmstat.c, cast several printf field widths to int, and
use printf format specifiers from inttypes.h for uint64_t's.

MFC after:	1 week
2011-12-17 19:22:24 +00:00
Sergey Kandaurov
8953ac4334 sintrcnt/sintrnames is the address of the size, not the actual size.
Use them appropriately to fetch the actual size.
That fixes vmstat -i with kvm backend.

Submitted by:	peter
Approved by:	re (kib)
2011-07-18 19:42:18 +00:00
Attilio Rao
521ea19d1c - Remove the eintrcnt/eintrnames usage and introduce the concept of
sintrcnt/sintrnames which are symbols containing the size of the 2
  tables.
- For amd64/i386 remove the storage of intr* stuff from assembly files.
  This area can be widely improved by applying the same to other
  architectures and likely finding an unified approach among them and
  move the whole code to be MI. More work in this area is expected to
  happen fairly soon.

No MFC is previewed for this patch.

Tested by:	pluknet
Reviewed by:	jhb
Approved by:	re (kib)
2011-07-18 15:19:40 +00:00
Kevin Lo
aa7e4bb466 Remove duplicated header files 2011-06-24 07:18:44 +00:00
Ed Maste
ea9827d3be Remove uptime validity check that hasn't been necessary since r151417
switched to clock_gettime.  vmstat will now not exit with an error
if run on a system with 10 years of uptime.
2011-03-17 01:05:54 +00:00
Joel Dahl
da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Kevin Lo
a48551fac2 Remove unused variable 2010-11-20 15:22:16 +00:00
Ulrich Spörlein
0d9deed52c mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Sean Bruno
bf96595915 Add a new column to the output of vmstat -z to indicate the number
of times the system was forced to sleep when requesting a new allocation.

Expand the debugger hook, db_show_uma, to display these results as well.

This has proven to be very useful in out of memory situations when
it is not known why systems have become sluggish or fail in odd ways.

Reviewed by:	rwatson alc
Approved by:	scottl (mentor) peter
Obtained from:	Yahoo Inc.
2010-06-15 19:28:37 +00:00
Sean Bruno
8b10473d30 Allow sub-second interval timings for iostat and vmstat.
e.g.
vmstat -w.5
iostat -w.5

Reviewed by:	jhb
Approved by:	scottl (mentor)
Obtained from:	Yahoo Inc.
MFC after:	2 weeks
2010-05-21 17:10:52 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
John Baldwin
f786e2f82e When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts
and sum them to form the total counts.

PR:		bin/135893
Submitted by:	Mikolaj Golub  to my trociny of gmail
MFC after:	1 week
2009-10-29 17:34:02 +00:00
Xin LI
61613f1912 Utilize calloc() instead of bzero'ing manually. 2009-02-21 03:43:20 +00:00
Giorgos Keramidas
e9d8f84b73 Fix comment typo that managed to sneak in when I copy pasted some
comments & code from iostat.
2008-11-04 18:20:54 +00:00
Giorgos Keramidas
4fb6032f19 Repeat vmstat header after window.rows instead of a hardcoded 20.
Use ioctl() to get the window size in vmstat(8), and force a new
header to be prepended to the output every time the current window
size changes.  Change the number of lines before each header to the
current lines of the terminal when the terminal is resized, so that
the full terminal length can be used for output lines.

Inspired by:	svn change 175562 (same feature for iostat)
Reviewed by:	ru (who fixed some of my bugs too)
MFC after:	1 week
2008-11-04 18:02:35 +00:00