top
QNX SDP8.0Utilities ReferenceUtilities
Display system usage (Unix)
Syntax:
top [-bdt] [-D delay] [-i number] [-p priority] [-z num_threads]
Runs on:
QNX OS
Options:
- -b
- Use batch mode for background operation. This is useful if you want to redirect the output from top to another process; in batch mode, top doesn't accept input, and so it runs for the number of iterations specified with the -i option or until you kill it.
- -D delay
- Set the delay, in seconds, for refreshing the display. The default is 5; the minimum is 1, and the maximum is 5000.
- -d
- Tailor the output for a dumb terminal. By default, top refreshes its output in place for each iteration. If you specify -d, top displays the output for each iteration after the output from the previous one.
- -i number
- Run for the specified number of iterations. By default, top runs until you terminate it.
- -p priority
- Run at the specified priority.
- -t
- Display the thread names.
- -z num_threads
- Specify the number of threads to display. The default is 10; the minimum is 5, and the maximum is 100.
Description:
The top utility runs in a loop, displaying the system usage, waiting for a
while, and then refreshing the display. Its output looks like this:
18 processes; 119 threads;
CPU states: 26.8% user, 26.3% kernel
Memory: 1024M total, 874M avail, page size 4K
PID TID PRI STATE HH:MM:SS CPU COMMAND
1 20 10 Run 00:00:03 20.17% kernel
299010 1 10 Rply 00:00:04 14.31% top
28676 1 10 Rcv 00:00:03 11.96% devc-serpl011
1 3 255 Intr 00:00:00 2.20% kernel
1 4 255 Intr 00:00:00 2.15% kernel
1 6 254 Intr 00:00:00 0.95% kernel
1 5 254 Intr 00:00:00 0.86% kernel
151564 12 21 Rcv 00:00:00 0.57% io-sock
1 16 10 Rcv 00:00:03 0.00% kernel
151564 21 10 CdV 00:00:00 0.00% io-sock
Curr Min Max Average
CPU 0 idle: 37.3% 21% 97% 37%
CPU 1 idle: 39.1% 28% 97% 43%
Mem Avail: 873MB 874MB 373MB
Processes: 18 20 18
Threads: 119 121 119
The utility supports the following interactive commands:
- ? or h
- Display help information.
- d
- Modify the delay between updates. The default is 5 seconds.
- k
- Kill a process; top prompts you for the process ID.
- l
- Refresh the screen.
- n
- Modify the number of threads to display. The default is 10; the minimum is 5.
- q
- Quit.
Note:
For a
more comprehensive method of determining how much memory a process uses, go to
Calculating virtual memory reserved by a processin the
Process Managerchapter of the System Architecture guide.
Page updated: