onto it, which may have been used for rounding purposes in other utilities.
PR: bin/147934
Submitted by: Janne Snabb <snabb at epipe.com>
Approved by: rrs (mentor)
MFC after: 2 weeks
changing format_k2 to take a long long. Because itoa is defined as a K&R
C function, without prototyping its arguments, format_k2 passed a 64-bit
value, but itoa() received only the first word, showing '0' in all memory
fields.
to match the values passed in and prevent the SIZE field being corrupted
when more than 2TB is allocated.
PR: bin/129706
Approved by: rrs (mentor)
MFC after: 1 week
that takes into account the width of the largest CPU ID. On systems with
> 10 CPUs the labels for the first 10 CPUs were not lined up properly
otherwise.
Approved by: re (kib)
MFC after: 1 week
record-only mergeinfo because an automated merge is confused by the
flattening that took place:
Move install to install-sh to prevent name-clashes.
MFC after: 3 days
titles extracted from argv vector instead of the real executable names.
This is useful when you want to watch applications that set their status
information via setproctitle(3).
Approved by: alfred
MFC after: 2 weeks
contains a sigdec[] vector of structures, but the generated output is
missing braces around the initializer of each struct, which
triggers warnings in WARNS=3:
src/usr.bin/top/sigdesc.h:10: warning: missing braces around initializer
src/usr.bin/top/sigdesc.h:10: warning: (near initialization for `sigdesc[0]')
* Fix the sigconv.awk script to generate a header with initializers
which look better.
* Add rules to usr.bin/top/Makefile that rebuilds a new sigconv.h
header which matches the correct signal set from the build-time
version of `${DESTDIR}/usr/include/signal.h' (so sigconv.h doesn't
get stale once changes are made to the header).
* Remove the old sigconv.h header, now that it is autoupdated at
build time.
* Various Makefile style fixes (the committed Makefile was kindly
submitted by Ruslan):
- Reorder .PATH, PROG, SRCS and CFLAGS to match style.Makefile(5)
- Split off the generated sources (sigdesc.h top.local.h) in an
SRCS+= line of their own.
- Add entries to CLEANFILES near the rules that generate the
respective files.
- Move the explicit rule which builds top.1 after the implicit
rules which generate its dependencies.
Reviewed by: ru, bde
Submitted by: ru (Makefile)
MFC after: 2 weeks
have been noticed by running top(1) in terminals that are too narrow
(or on systems with usernames that were too long, pushing everything
too far to the right).
Note that this does *not* solve the wrap-around problem of the system
statistics, which is an entirely different matter :-/
Tested on: i386, sparc64 (panther), amd64 (sledge)
Approved by: davidxu (in principle)
command that toggles between the two and update the ORDER_PCTCPU()
macro to sort correctly by the visible "cpu" value.
This saves 6 more columns in 80-column terminals, making things a lot
better for the COMMAND column.
Tested on: i386, sparc64 (panther), amd64 (sledge)
Approved by: davidxu (in principle)
threads a process has. The THR column is disabled and disappears
when 'H' is hit, because then every thread gets its own output line.
- Allow sorting processes by "threads".
Approved by: davidxu
Inspired by: Jiawei Ye <leafy7382@gmail.com>
example) view io stats while sorting by process size. Also adds
voluntary and involuntary context-switch stats to the io page because
there was lots of room.
Submitted by: Dan Nelson dnelson at allantgroup.com
are doing. Toggle this mode by hitting "m" or passing the command line
option "-m io" to top(1). This allows one to identify disk bandwidth
hogs much easier.
you can start it in a small window, but it doesn't always display
anything sensible. Resizing the window does work though.
The patch is a slightly simpler one than Sheldon's in the PR.
PR: 21075