top

Display system usage (Unix)

Syntax:

top [-bd] [-i number] [-n node] [-p priority]

Runs on:

QNX Neutrino

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
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.
-n node
Run top on the specified remote node.
-p priority
Run at the specified priority.

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:

42 processes; 119 threads;
CPU states: 67.3% idle, 29.9% user, 2.7% kernel
Memory: 0 total, 368M avail, page size 4K

      PID   TID PRI STATE    HH:MM:SS    CPU  COMMAND
   593962     1  10 Rcv       0:00:04  16.45% firefox-bin
   278558     3  12 Rply      0:00:50   6.00% io-graphics
   278558     2  10 Rcv       0:00:00   2.15% io-graphics
        1    19  10 Run       0:00:03   1.52% kernel
        1    13  10 Rcv       0:00:00   1.18% kernel
     8200    11  10 Rcv       0:00:00   0.73% devb-eide
   114707     2  12 Rcv       0:00:02   0.71% io-display
   131092     2  21 Rcv       0:04:39   0.35% io-pkt-v4-hc

             Min        Max       Average
CPU idle:     45%        98%        67%
Mem Avail:   368MB      398MB      382MB
Processes:    39         42         41
Threads:     104        119        111

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.