| -l nsamples logging mode in raw form.
||-L non-logging i.e. interactive
|| -n nprocs
|| -o key sort on key in descending order. || -O skey secondary sort key |
pid Process ID (default).
prt Number of Mach ports.
reg Number of memory regions.
rprvt Resident private address space size.
rshrd Resident shared address space size.
rsize Resident memory size.
th Number of threads.
time Execution time.
uid User ID.
vprvt Private address space size.
vsize Total memory size.
| -r recursively traverse and report the memory object map for each process (default).
|| -R not recursive . This substantially reduces the amount of processor time top consumes.
||-s delay Set the delay between updates to delay seconds.
|| -t Translate uid numbers to usernames.
|| -T Do not
|| -U user Only display processes owned by var>|| -W + or - to indicate deltas (default).
|| -w Display delta values, rather than just + or -.
||-F omitt frameworks(i.e. shared libraries) This substantially reduces the amount of processor time top consumes.
||-f include shared libraries(default).
|| -X run in compatibility mode (default). This causes top to display output in the same format as the version of top included with Jaguar. Specifying this flag in combination with options that did not exist in Jaguar's top may produce meaningless output in some cases. For documentation on the usage and output of Jaguar's top, see top(1) on a Jaguar system. When this option is specified, all interactive key bindings are the same as in Jaguar's top, except that the x key switches to compatibility mode.
|| -x do not Run in compatibility mode.
Command line options are processed from left to right.
If conflicting options are specified, later specifications overrides .
making it viable to create a shell alias for top with preferred defaults , then override those preferred defaults as desired on the command line.
The first several lines show the global state.
CPU Percentage of processor usage, broken into user, system, and idle components.
Disks reads and writes.
LoadAvg over 1, 5, and 15 minutes.
MemRegions Number and total size of memory regions, and total size of memory regions broken into private (broken into non-library and library) and shared components.
PhysMem wired, active, inactive, used, and free components.
Procs Total number of processes and number of processes in each process state.
SharedLibs Number of shared libraries, resident sizes of code and data segments, and link editor memory usage.
VirtMem Total virtual memory, virtual memory consumed by shared libraries, and number of pageins and pageouts.
COW_FAULTS faults causing a page to be copied.
CSWITCH context switches.
MSGS_RCVD Mach messages received.
MSGS_SENT Mach sent.
PRT(delta) Mach ports.
RPRVT(delta) Resident private memory size.
RSHRD(delta) Resident shared
RSIZE(delta) Total resident , including shared pages.
BSYSCALL BSD system calls
TH Number of threads.
TIME Absolute processor time consumed.
VPRVT(delta) Private address space size.
VSIZE(delta) Total address space allocated, including shared pages.
other Keypresses cause a sample update.
prtNumber of Mach ports.
regNumber of memory regions.
rprvtResident private address space size.
rsizeResident memory size.
thNumber of threads.
vsizeTotal memory size.
toggles f frameworks r recursive (traversal)of the memory object map for each process. t translation of uid numbers to usernames. U Only display processes owned by . Either the username or uid number can be specified. To display all processes, press enter without entering a username or uid number. w wide/narrow delta x deprecated/normal S Send to . can be specified either as a number or as a name (for example, HUP). The default signal starts out as TERM. Each time a signal is successfully sent, the default signal is updated to be that signal. is a process id. q Quit. ? Display the help screen. Any character exits help screen mode. This command always works, even in the middle of a command. deprecated-- -a use -ca. -d use -cd. -e use -ce. -k used to turn on memory object reporting for process 0 (kernel_task), but this is now done by default. -u use -ocpu -Otime. -h Print command line usage information and exit. EXAMPLES
top -ocpu -O+rsize -s 5 -n 20
Sort the processes according to CPU usage (descending) and
sOresident memory size (ascending),
update every 5 seconds , and limit to 20 processes.
top -ce Run top in event counter mode.
top -tl 10
Translate uid numbers to usernames and run in logging mode, taking 10 samples at 2 second intervals.
SEE ALSO kill(2), top(1)[Jaguar], vm_stat(1), signal(3)
from BSD Apple darwin 7.9.0