| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
comments & code from iostat.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
since the 'cp_time' symbol doesn't exist in recent kernels. This fixes
iostat and vmstat on crash dumps.
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
This would prevent it from skipping non-present cpus in -P output.
Submitted by: Pieter de Goeje <pieter@degoeje.nl>
|
|
|
|
|
|
| |
user/system/idle stats. -h feeds the memory column through
humanize_number() to reduce the amount of column overflowing. -H turns
this off. -h is turned on by default if stdout is a tty.
|
|
|
|
|
|
| |
reporting the value of this counter in the program "vmstat".
Approved by: re (rwatson)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
them unsigned I made the possible overflows hard to detect,
and it only saved 1 bit which isn't principal, even less now
that the underlying issue with the total of virtual memory has
been fixed. (For the record, it will overflow with >=2T of
VM total, with 32-bit ints used to keep counters in pages.)
- While here, fix printing of other "struct vmtotal" members
such as t_rq, t_dw, t_pw, and t_sw as they are also signed.
Reviewed by: bde
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
- Fix overflow bugs in sysctl(8), systat(1), and vmstat(8)
when printing values of "struct vmmeter" in kilobytes as
they don't necessarily fit into 32 bits. (Fix sysctl(8)
reporting of a total virtual memory; it's in pages too.)
|
| |
|
| |
|
|
|
|
| |
- Widen some columns; make width of header columns less cryptic.
|
|
|
|
| |
PR: kern/102940
|
| |
|
|
|
|
|
| |
freed), & cs (CPU context switch rate). 'vmstat 1' output is now lined up
for today's typical machines vs. a VAX. [tested my modest 1.6ghz laptop]
|
|
|
|
|
|
|
|
| |
Reflect this in other paragraphs.
PR: 93201
Submitted by: Marian Cerny
MFC After: 1 week
|
|
|
|
|
|
| |
instead of subtracting 'bootime' from 'now'.
Sponsored by: TCP/IP Optimization Fundraise 2005
|
|
|
|
| |
this information from the core dump.
|
|
|
|
|
| |
descriptor is non-NULL, restoring vmstat -z support for core dumps and
kmem access. These were broken with the introduction of UMA.
|
|
|
|
|
|
|
|
|
|
| |
- Remove some extra blank lines.
- Remove comments that don't contribute to understanding.
- Remove additional blank lines in output added to maximize compatibility
with older vmstat output, but that is actually somewhat gratuitous.
Submitted by: bde
MFC with: other vmstat libmemstat(3) changes
|
|
|
|
|
|
|
|
|
|
|
| |
statistics from -z are now a bit different due to changes in the
way statistics are now measured. Reproduce with some amount of
accuracy the slightly obscure layouts adopted by the two kernel
sysctls. In the future, we might want to normalize them.
GC dosysctl(), which is now no longer used.
MFC after: 1 week
|
|
|
|
|
|
|
| |
malloc(9) statistics from kernel memory or a kernel coredump, to catch
up with recent changes to adopt per-CPU malloc(9) statistics. The new
routines walk the per-CPU statistics pools and coalesce them for
presentation to the user.
|
|
|
|
| |
sections, so that users of one can learn about the others easily.
|
| |
|
|
|
|
|
|
| |
number of pages.
Obtained from: Yahoo!
|
| |
|
| |
|
|
|
|
|
| |
is much harder, and -m is grossly using unexported interfaces (that is,
the array of malloc zones/sizes does not have an exported type).
|
| |
|
|
|
|
|
| |
PR: 65889
Submitted by: Ken Stailey
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed a nearby bug. The "play it safe" code in dosysctl() was unsafe
because it overran the buffer by 1 if sysctl() filled all of the buffer.
Fixed a nearby style bug in output. Not just 1, but 2 extra newlines
were printed at the end by "vmstat -m" and "vmstat -z". Don't print
any newlines explicitly. This depends on 2 of the many formatting
bugs in the corresponding sysctls. First, the sysctls return an extra
newline at the end of the strings. This also messes up output from
sysctl(8). Second, the sysctls return an extra newline at the beginning
of the strings. This is good for separating the 2 tables output by
"vmstat -mz" and for starting the header on a new line in plain sysctl
output, but gives a bogus extra newline at the beginning for "vm -[m | z]"
and "sysctl -n [kern.malloc | vm.zone]".
Fixed some nearby style bugs in the source code:
- the same line that misspelled 0 as NULL also spelled NULL as 0.
- the size was doubled twice in the realloc loop.
- the "play it safe" comment was misleading. Terminating the buffer
is bogus because dosysctl() is only meant to work with sysctls that
return strings and the terminator is part of a string. However, the
kern.malloc sysctl has more than style bugs. It also doesn't return
a string. Termination is needed to work around this bug.
|
| |
|
|
|
|
| |
Add some missing constness.
|
|
|
|
| |
Just wrap them in #if 0...#endif.
|
|
|
|
|
| |
forgotten about how sysctl works. This removes a potential (though
not very likely) race that 1.74 introduced.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Replace overly-complicated (and buggy) -a logic with a much simpler
version: -a causes all interrupts to be displayed, otherwise only
those that have occurred are displayed. This removes the need for
any MD code.
- Instead of just making sure intrcnt is large enough, figure out the
exact size it needs to be. We derive nintr from this number, and we
don't want to risk printing garbage. Note that on sparc64, we end up
printing garbage anyway because the names of non-existent interrupts
are left uninitialized by the kernel.
Tested on: alpha, i386, sparc64
|
| |
|
|
|
|
|
|
|
| |
ints to size_ts to better match the types of variables they are used
with).
Glanced at by: des
|
|
|
|
|
|
|
| |
o nintr and inamlen must by of type size_t, not int,
o Remove now unnecessary casts,
o Handle the aflag differently, because the intr. names have a
fixed width and almost always have trailing spaces.
|
|
|
|
|
|
|
|
|
| |
The use of libkvm for post-mortem analysis is still supported (though it
could use more testing). We can now remove vmstat's setgid bit.
While I'm here, hack the interrupt listing code to not display interrupts
that haven't occurred unless the -a option was given on the command line,
and document this change.
|
|
|
|
|
|
| |
Total being shorter than interrupt)..
Pointed out by: bde
|
|
|
|
|
|
|
|
| |
the last commit...
include some minor style changes and fixes that bde sent me
Submitted by: bde
|
|
|
|
|
|
| |
as necessary... on sparcs where:
atapci0 vec1996
is a bit too long
|
|
|
|
|
|
| |
system calls it displays stats about.
PR: 50924
|