Process 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.
Run top and press
<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.
Run htop and press
<F2> for fields management view. Navigate down to Columns. Use
<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.
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'