| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
This allows 3 digit CPU columns to look nice
Reported by: feld
Notes:
svn path=/head/; revision=335601
|
|
|
|
|
|
|
|
| |
This avoids the need to have separate buffers and calls to sprintf for
various calls.
Notes:
svn path=/head/; revision=335591
|
|
|
|
|
|
|
|
|
|
| |
This also fixes -mio with 'T' set (thread-id instead of process-id).
This can go further by removing the existing sprintf, and using sbuf
directly. This will be done in a followup commit.
Notes:
svn path=/head/; revision=335590
|
|
|
|
| |
Notes:
svn path=/head/; revision=335589
|
|
|
|
|
|
|
|
|
|
|
| |
There is no documented reason for this not to be shown on the first run.
I can't find any good reason, and it breaks batch mode.
PR: 218889
Submitted by: "Jeremy C. Reed" <reed@reedmedia.net>
Notes:
svn path=/head/; revision=335576
|
|
|
|
|
|
|
|
|
|
| |
top(1) now builds without cast-qual warnings, so remove the exemption
for that.
Tested with clang, gcc7, gcc9
Notes:
svn path=/head/; revision=335552
|
|
|
|
|
|
|
|
| |
- remove a now-unused function
- remove needless indirection of handle type
Notes:
svn path=/head/; revision=335551
|
|
|
|
|
|
|
|
|
|
| |
On machines with more than 99 CPUs make room to display the entire
number.
Requested by: cperciva
Notes:
svn path=/head/; revision=335550
|
|
|
|
|
|
|
|
|
|
| |
When the load is "high" (an arbitrary value) top(1) previously moved the
cursor to the top-left of the screen as an acknowledgment. In practice,
on modern machines, even relatively slow ones, it looked more like a
glitch. Remove the logic.
Notes:
svn path=/head/; revision=335547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current header formatting is a giant format string that changes
global state during the format process.
Make the following changes:
- use sbuf to build up the header rather than use the above
pseudo-dynamic one
- Change name length to 10
- Reduce size of RES and SIZE by making humanize more aggressive
- Restore a version number line to the copyright. This may be required
by the copyright (and may not be; its unclear)
This is also a pre-req to implementing TOPCOLOR from newer versions of
top(1)
Discussed with: allanjude, rpolka, danfe, rgrimes
Differential Revision: https://reviews.freebsd.org/D15801
Notes:
svn path=/head/; revision=335539
|
|
|
|
|
|
|
| |
Show top itself by default, unless -t is specified.
Notes:
svn path=/head/; revision=335517
|
|
|
|
| |
Notes:
svn path=/head/; revision=335390
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't call strerror on negative errnos
Reported by: Coverity
CID: 976708
Reviewed by: eadler
Differential Revision: https://reviews.freebsd.org/D15909
Notes:
svn path=/head/; revision=335381
|
|
|
|
| |
Notes:
svn path=/head/; revision=335360
|
|
|
|
|
|
|
|
|
|
| |
Fix an oversight from r334869 which made the same change, but only for
SMP systems. This avoids a segfault while D15801 is being reviewed.
Reviewed by: kevans
Notes:
svn path=/head/; revision=335359
|
|
|
|
|
|
|
|
| |
Rather than manually build signal masks use functions designed for that
reason. Also use sigprocmask instead of sigblock.
Notes:
svn path=/head/; revision=335310
|
|
|
|
|
|
|
| |
I wrote some, but not enough for the man page.
Notes:
svn path=/head/; revision=335134
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Broken in r334514
sysctlbyname("vfs.zfs.compressed_arc_enabled", ...) would return ENOMEM
while trying to read the sysctl (a boolean_t) into a bool, which is too small.
Reviewed by: jhb (on irc)
Sponsored by: Klara Systems
Notes:
svn path=/head/; revision=335099
|
|
|
|
|
|
|
|
|
|
|
|
| |
- remove __pure annotations I added earlier for some functions. One
writes to the the arguments as "out" pointers. The
other reads from an array, which while const within the function might
be mutated externally.
- total_change is modified to be at 1, if previously 0, so no if check
is needed.
Notes:
svn path=/head/; revision=335049
|
|
|
|
|
|
|
|
| |
- split return type from function name
- Sprinkle a __pure where possible.
Notes:
svn path=/head/; revision=335043
|
|
|
|
|
|
|
|
| |
At this point I've mucked enough with top(1) that all bugs should be
blamed on me rather than William LeFebvre.
Notes:
svn path=/head/; revision=335042
|
|
|
|
| |
Notes:
svn path=/head/; revision=335040
|
|
|
|
|
|
|
|
| |
Much of this should be inlined to the callsite, but leave it here for
now to make it easier to make it easier bisect later.
Notes:
svn path=/head/; revision=335039
|
|
|
|
|
|
|
|
| |
- Use humanize_number for format_k and format_k2
- Fix some style nits in format_time
Notes:
svn path=/head/; revision=335038
|
|
|
|
|
|
|
|
| |
For entries that are duplicates present them nicely rather than showing
two identical help entries. For ' ' present it as SPC
Notes:
svn path=/head/; revision=335037
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- initialize all maybe uninitialized vars with bogus values. This shuts
up the compiler, and causes crashes if it changes later.
- mark noreturn as noreturn
- removed unused macro
- handle x_procstate as runtime rather than pre-processor
- avoid using void functions in condtionals
Tested with clang, gcc 7, gcc 9
Notes:
svn path=/head/; revision=335024
|
|
|
|
| |
Notes:
svn path=/head/; revision=334990
|
|
|
|
|
|
|
|
|
|
| |
- style(9)
- remove now-defunct comments
- remove getuid check for low delay
- expand range of format_k
Notes:
svn path=/head/; revision=334989
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This eliminates the difficult to follow mapping of a string list. It
moves numbers from "#define" into (more) debuggable enums. More
generally, it follows the trend of moving more data into a more central
mechanism.
The help output is a little worse: " " is not rendered well, and there
are duplicate entries, but that will be fixed in a followup.
Notes:
svn path=/head/; revision=334988
|
|
|
|
| |
Notes:
svn path=/head/; revision=334941
|
|
|
|
|
|
|
|
| |
- attempt and fail, rather than check for permission.
- use macro rather than explicit "-20"
Notes:
svn path=/head/; revision=334922
|
|
|
|
| |
Notes:
svn path=/head/; revision=334921
|
|
|
|
|
|
|
|
| |
This enables the removal of the signal.h awk script. Shamelessly stolen
from kill(1).
Notes:
svn path=/head/; revision=334920
|
|
|
|
|
|
|
|
| |
Right now this is only used for help text but it'll eventually be used
to build up long options array, dispatch commands, etc.
Notes:
svn path=/head/; revision=334919
|
|
|
|
|
|
|
|
| |
PR: 182204
Reported by: "Brodey Dover" <doverosx@gmail.com>
Notes:
svn path=/head/; revision=334918
|
|
|
|
|
|
|
|
|
|
|
| |
- remove WARNS?=6. It is default
- we no longer have cast-qual problems
- remove unused macros
- remove unneeded casts
- add include guard for loadavg.h
Notes:
svn path=/head/; revision=334917
|
|
|
|
| |
Notes:
svn path=/head/; revision=334916
|
|
|
|
|
|
|
|
|
|
| |
This removes the getuid check for delay==0. It didn't prevent users from
writing similar programs in the general case. In theory, if top(1) is
among one of the few restricted programs you're allowed to run, it may
have helped a little, but there are better ways of handling that case.
Notes:
svn path=/head/; revision=334906
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had changed this from a for loop to a memset during an earlier
cleanup. This change was incorrect so revert it.
While here, clean up
Reported by: flo
Notes:
svn path=/head/; revision=334903
|
|
|
|
|
|
|
|
| |
When told to watch a specific pid, don't filter idle, system, or self
processes. The summary at the top will still flip correctly though.
Notes:
svn path=/head/; revision=334901
|
|
|
|
| |
Notes:
svn path=/head/; revision=334899
|
|
|
|
|
|
|
|
| |
The previous man page used many conventions not typical in FreeBSD.
Since we've forked top completely, convert the man page too.
Notes:
svn path=/head/; revision=334898
|
|
|
|
|
|
|
|
| |
This also documents some reserved or differing options from top's
original upstream.
Notes:
svn path=/head/; revision=334897
|
|
|
|
| |
Notes:
svn path=/head/; revision=334893
|
|
|
|
|
|
|
|
|
|
|
| |
THR is always 6 digits or longer. Now that the PID/THR change is
separated, use correct headers.
PR: 228823
Reported by: Trond.Endrestol@ximalas.info
Notes:
svn path=/head/; revision=334869
|
|
|
|
| |
Notes:
svn path=/head/; revision=334866
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- By popular demand, implement a different switch ("T") for toggling
between thread id and process id.
- Add an assert that the size of command chars is as expected.
- Also clean up some messiness I found when implementing this.
- Further document the new flag.
Requested by: flo, ronald-lists@klop.ws, bapt
PR: 139389 (for the record)
X-MFC-With: r334474
Notes:
svn path=/head/; revision=334864
|
|
|
|
| |
Notes:
svn path=/head/; revision=334823
|
|
|
|
|
|
|
|
|
| |
- use parens for return
- put function names on newline
- sprinkle const where possible
Notes:
svn path=/head/; revision=334822
|
|
|
|
|
|
|
|
| |
I am amazed at my ability to get a one-line error reporting line wrong
thrice.
Notes:
svn path=/head/; revision=334706
|