This is my current setup for htop!
Some different settings that I've put are described below:
- Tree view for processes
With this config, its possible to visually see the tree of what process spawned that child process. And it's a lot easier to manage it, if you need to kill the app, you can see the head process easier :)
- Graph Option to see Memory and CPU
With this visualization, is possible to get some history of the average use of it and it's very cool!
- Disk usage and Network Throughput
More Information about data transfers happening in your machine
Here's the config file I'm using
# Copy or symlink this file to ~/.config/htop/htoprc
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=111
sort_direction=1
tree_sort_key=1
tree_sort_direction=1
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
tree_view=1
tree_view_always_by_pid=0
header_margin=1
detailed_cpu_time=1
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=1
degree_fahrenheit=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=5
enable_mouse=1
delay=15
left_meters=Hostname Uptime Battery Blank Blank AllCPUs2 Blank CPU CPU
left_meter_modes=2 2 2 2 2 1 2 3 2
right_meters=Systemd LoadAverage Tasks Blank Blank DiskIO NetworkIO Swap Memory Blank Memory Memory
right_meter_modes=2 2 2 2 2 1 1 1 1 2 3 2
hide_function_bar=0
If you wanna use my config, just copy or symlink this file to your home directory local htop config in ~/.local/htop/htoprc
Or to start using it, you can just run this oneliner!
mv ~/.config/htop/htoprc ~/.config/htop/htoprc.bkp && \
wget https://gist.githubusercontent.com/janjitsu/8757fa457da826a752c305a436de853d/raw/b9ef168ad405cf2fa8dd13708eeff2371e046392/htoprc \
-P ~/.config/htop && htop
If anything goes wrong and you decide to go back to your previous config, previous oneliner is first moving your current htoprc to htoprc.bkp, so you can just move it back like that
mv ~/.config/htop/htoprc.bkp ~/.config/htop/htoprc
Making your own htop setup
If you are adventurous enough, you can setup your own meters and configs inside htop itself
just open htop and press F2 for going to the setup system.
Follow along while we add another meter to our setup
Example - Adding a clock to our panel
open htop and press F2, you will see the setup menu
Press right right right and enter to select clock meter it will be put in the right column.
Press Space to change the style of the meter, lets change it to LED, then press Enter to confirm.
Press Esc To see our final htop
When you close htop, pressing F10 or clicking on the menu to quit if you got mouse enabled, this config will be saved to the same htoprc
file we were fiddling with it
More Tips
In the availabe meters column you can use the up and down arrows to chose other meters.
You can also use Blank as a separator, in my setup, you can see I'm using some blanks there too.
Wrapping up
I hope you liked my tutorial and If you create some cool setup, make sure you publish it using the tag #htop
and drop it in the comments. :)
htop é top! 🔝
This post was inspired by htop: Quick Guide & Customization
Top comments (0)