History log of /freebsd/usr.bin/top/commands.c (Results 1 – 25 of 35)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0
# a00d703f 16-Jun-2021 John Grafton <john.grafton@gmail.com>

top(1): support command name and argument grepping

Obtained from: OpenBSD
Reviewed by: imp@
Pull Request: https://github.com/freebsd/freebsd-src/pull/479


Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0
# 51c834c4 22-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): reimplement header formatting as sbuf

The current header formatting is a giant format string that changes
global state during the format process.

Make the following changes:
- use sbuf to b

top(1): reimplement header formatting as sbuf

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

show more ...


Revision tags: release/11.2.0
# aa9d9bfa 19-Jun-2018 Alan Somers <asomers@FreeBSD.org>

top(1): Fix Coverity warning

Don't call strerror on negative errnos

Reported by: Coverity
CID: 976708
Reviewed by: eadler
Differential Revision: https://reviews.freebsd.org/D15909


# e7cb1c07 13-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): format help more nicely

For entries that are duplicates present them nicely rather than showing
two identical help entries. For ' ' present it as SPC


# 0ff79d81 12-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): remove trailing whitespace


# ccf22059 12-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): style and related

- style(9)
- remove now-defunct comments
- remove getuid check for low delay
- expand range of format_k


# c8aa5e52 12-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): move command mapping to commands.c

This eliminates the difficult to follow mapping of a string list. It
moves numbers from "#define" into (more) debuggable enums. More
generally, it follows

top(1): move command mapping to commands.c

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.

show more ...


# a0116099 10-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): use modern interfaces for nice and related

- attempt and fail, rather than check for permission.
- use macro rather than explicit "-20"


# 1a8f56dd 10-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): add command aliases; correct dumb support


# 561b0720 10-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): use sys_signame instead of hard coding signals

This enables the removal of the signal.h awk script. Shamelessly stolen
from kill(1).


# b26cf3d0 10-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): bring some structure to commands

Right now this is only used for help text but it'll eventually be used
to build up long options array, dispatch commands, etc.


# da446b10 10-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): permit sending signal with any case


# fc36f5a7 09-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): use a different command to toggle tid vs pid

- By popular demand, implement a different switch ("T") for toggling
between thread id and process id.
- Add an assert that the size of command c

top(1): use a different command to toggle tid vs pid

- 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

show more ...


# cda7a5d5 04-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): some nitpicks

- prefer fully spelled names to "u_long"
- fix speeling


# 8d0d2676 04-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): include what you use

- Change headers to more closely match what we use
- use more standard functions instead of bzero, bcmp, bcopy
- Add myself to authors.

Tested with: base clang (amd64),

top(1): include what you use

- Change headers to more closely match what we use
- use more standard functions instead of bzero, bcmp, bcopy
- Add myself to authors.

Tested with: base clang (amd64), gcc 9 (amd64), base clang (i386), base
gcc (mips)

show more ...


# d0bb69dc 03-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): misc minor improvements

- use bool instead of int [0]
- use calloc correctly [0]
(this also caught an incorrect sizeof argument) [1]
- use size_t over int [2]
- correct style

Reported by:

top(1): misc minor improvements

- use bool instead of int [0]
- use calloc correctly [0]
(this also caught an incorrect sizeof argument) [1]
- use size_t over int [2]
- correct style

Reported by: pfg [0], scan-build [1], gcc [2]

show more ...


# 51b29cb7 02-Jun-2018 Roman Bogorodskiy <novel@FreeBSD.org>

top: add -p option and p command to only show a single process

Allow to show only a single process specified by PID. This could
be done either by running top like 'top -p PID' or using the 'p' comma

top: add -p option and p command to only show a single process

Allow to show only a single process specified by PID. This could
be done either by running top like 'top -p PID' or using the 'p' command
inside top.

Reviewed by: eadler
Approved by: eadler
Obtained from: OpenBSD
Differential Revision: https://reviews.freebsd.org/D15501

show more ...


# 0b2f6ed1 02-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): Use standard boolean rather than homegrown alternative


# 220e4623 02-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): remove two unneeded headers


# f6234b51 02-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): ansify, style(9). and nits

- Prefer using ansi prototypes rather than C prototypes
- Keep type on separate line from name of function
- Try to keep things const where possible. This will hel

top(1): ansify, style(9). and nits

- Prefer using ansi prototypes rather than C prototypes
- Keep type on separate line from name of function
- Try to keep things const where possible. This will help get to WARNS=6
- switch to "bool" where it makes sense

show more ...


# bc875b45 22-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): unbreak build with gcc7; fix varargs

- use correct function for varargs argument
- allow build to complete with gcc7 at current WARNS

Reported by: jhibbits, ian


# 3c9ec0a5 21-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): clean up some "const" related warnings

This leaves at WARNS=6:
35 warnings in top.c
88 warnings in machine.c

all of which are either "incompatible-pointer-types-discards-qualifiers"
or "cas

top(1): clean up some "const" related warnings

This leaves at WARNS=6:
35 warnings in top.c
88 warnings in machine.c

all of which are either "incompatible-pointer-types-discards-qualifiers"
or "cast-qual"

show more ...


# 00157b4c 21-May-2018 Eitan Adler <eadler@FreeBSD.org>

Revert r333969 which contained one too many changes


# bfb79c2c 21-May-2018 Eitan Adler <eadler@FreeBSD.org>

top(1): modernize a bit; reduce warnings

- Replace caddr_t with "void *". This reduces
the number of warnings at WARNS=6
- use "static" where possible
- sprinkle const where possible

This leaves at

top(1): modernize a bit; reduce warnings

- Replace caddr_t with "void *". This reduces
the number of warnings at WARNS=6
- use "static" where possible
- sprinkle const where possible

This leaves at WARNS=6:
35 warnings in top.c
72 warnings in machine.c
5 warnings in commands.c

all of which are either "incompatible-pointer-types-discards-qualifiers"
or "cast-qual"

show more ...


12