More informative top & htop

terminalProcess information related utilities top and htop are quite helpful by default, however, at times you may need to check additional details. Did you know that it is possible to extend both with extra informative fields? Let’s check out how.

top

Run top and press <f> or <F> to switch to fields management view. Use the following shortcuts to add remove fields (sorted in the order they might be required):

Up/Down    : navigate between fields
Right      : select to move the field (then move selected field with Up/Down)
Enter/Left : to commit the position
D/Space    : toggle show/do not show
Q/Esc      : exit the fields view to main view

One of the disadvantages of using top is the column for the new field shows at far right and sometimes goes out of the screen. You may need to press <Left> in the main view to check the column.

The advantage is the fields have small notes explaining what they stand for.

htop

Run htop and press <F2> for fields management view. Navigate down to Columns. Use <Up>/<Down> under Active Columns to set the position of the new field. Press <Right> to move to Available Columns. Select the field you want to add and press <Enter> to commit. Press <F10> to go back to main view.

htop arranges the columns close to each other. However, there are no explanations for the fields available. Check the COLUMNS section in htop man page for information on each supported field.

Additional tip

htop shows full path to the process executable by default. To get the same in top, run:

$ top -c

You can add it as an alias in your ~/.bashrc:

alias top='top -c'

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s