Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Jump to menu and information about this site.


Useful but Unknown Unix Tools: htop //at 02:20 //by abe

from the top-on-steroids dept.

You probably know about “top”, in Debian and Ubuntu part of the procps package.

Ever wanted to see CPU and memory usage as bars and not numbers?

Ever wanted to kill a process from inside top by just selecting its row instead of having to type its pid?

Ever tried to press a cursor key inside top? It makes a noise and says “Unknown command - try ‘h’ for help”. Short said: top is not that interactive.

Ever wanted top to be more colorful?

Well, there is a solution to all these issues. It’s called htop (Debian package) and is some kind of colorful, ncurses based cross-over between top and a Midnight Commander for processes:

htop on single core machine htop on single core machine with MC theme htop on idling 16 core machine htop on 16 core machine under load
More screenshots of htop at and at the project’s site at SourceForge.

It can do many things, top can’t do:

  • Different color themes including fore- and background (includes also a monochrome theme for people considering ANSI colors being eye cancer :-)
  • Highlighting the current user’s processes.
  • Scrolling up, down and sidewards.
  • Interactively selecting processes with cursor keys as well as with the mouse.
  • Kill or renice the selected process without having to enter its pid
  • Show the CPU usage for each core and a CPU usage summary at the same time.
  • Show CPU, memory and swap usage as textual bars, either encoded in colors or characters.
  • Easy interactive configuring while running.
  • Automatically saves the current state (sort order, color scheme, etc.)
  • Easy access to the most often used functions through F-keys like in Midnight Commander.

One more cool thing about htop: It’s also available on the Nokia N900 as “app”.

The only thing I found so far that top can do, but htop can’t, is top’s batch mode (e.g. with “top -b -n 1”) where it runs non-interactively and its output can even be piped to other processes. The Xymon/Hobbit monitoring system uses that as input for some machine statistics.


Re: Useful but Unknown Unix Tools: htop

Posted by: jamessan
Time: Wed, 01 Dec 2010 02:20

Just press 1 to toggle between cumulative CPU% and per-processor in top.


Re: Useful but Unknown Unix Tools: htop

Posted by: Axel
Time: Wed, 01 Dec 2010 02:22

Thanks for that hint and correction. Fixed.


Re: Useful but Unknown Unix Tools: htop

Posted by: matsim
Time: Wed, 01 Dec 2010 07:47

Really great series about usefule but unknown unix commands, really useful! - noone(.org) can say that blogging is futile ;-)


Re: Useful but Unknown Unix Tools: htop

Posted by: Jo Shields
Time: Wed, 01 Dec 2010 14:02

The default config is a little flawed in some use-cases though...


Re: Useful but Unknown Unix Tools: htop

Posted by: Michi
Time: Fri, 03 Dec 2010 23:08

What I'm missing in htop: an option with wich it doesn't show the full path of the commands anymore, but instead only the program-name. Like top does it. Or are I'm only to stupid to find it?


Re: Useful but Unknown Unix Tools: htop

Posted by: paper writer
Time: Sun, 13 Mar 2011 20:05

This is very interesting information. You should find more about this theme.


Re: Useful but Unknown Unix Tools: htop

Posted by: paper writing service
Time: Fri, 18 Mar 2011 17:44

These are very useful tips, very useful.


Re: Useful but Unknown Unix Tools: htop

Posted by: Custom essay
Time: Sat, 16 Apr 2011 22:12

I hope it will help to many people


Re: Useful but Unknown Unix Tools: htop

Posted by: phentermine
Time: Sat, 18 Jun 2011 10:26

I would like to express writers my thanks for your largely sufficient and instructive story


Re: Useful but Unknown Unix Tools: htop

Posted by: backpack
Time: Thu, 07 Jul 2011 03:54

It's good that they have thought about that. It was about time they did something. Thanks for sharing.


Your Comment

Spam Protection: To post a comment, you'll have to answer the following question: What is 42 minus 19?

URL or E-Mail: [http://... or] (optional)
Title: (optional)
Spam Protection Answer:

Tag Cloud

2CV, aha, Apache, APT, aptitude, ASUS, Automobiles, autossh, Berlin, bijou, Blogging, Blosxom, Blosxom Plugin, Browser, BSD, CDU, Chemnitz, Citroën, CLI, CLT, Conkeror, CSS, CX, deb, Debian, Doofe Parteien, E-Mail, eBay, EeePC, Emacs, Epiphany, Etch, ETH Zürich, Events, Experimental, Firefox, Fläsch, FreeBSD, Freitagstexter, FVWM, Galeon, Gecko, git, GitHub, GNOME, GNU, GNU Coreutils, GNU Screen, Google, GPL, grep, grml, gzip, Hackerfunk, Hacks, Hardware, Heise, HTML,, IRC, irssi, Jabber, JavaShit, Kazehakase, Lenny, Liferea, Linux, LinuxTag, LUGS, Lynx, maol, Meme, Microsoft, Mozilla, Music, mutt, Myon, München, nemo, Nokia, nuggets, Open Source, Opera, packaging, Pentium I, Perl, Planet Debian, Planet Symlink, Quiz, Rant, ratpoison, Religion, RIP, Sarcasm, Sarge, Schweiz, screen, Shell, Sid, Spam, Squeeze, SSH, Stoeckchen, Stöckchen, SuSE, Symlink, Symlink-Artikel, Tagging, Talk, taz, Text Mode, ThinkPad, Ubuntu, USA, USB, UUUCO, UUUT, VCFe, Ventilator, Vintage, Wahlen, Wheezy, Wikipedia, Windows, WML, Woody, WTF, X, Xen, zsh, Zürich, ÖPNV


Mo Tu We Th Fr Sa Su

Tattletale Statistics

Blog postings by posting time
Blog posting times this month


Advanced Search


Recent Postings

0 most recent of 0 postings total shown.

Recent Comments

Hackergotchi of Axel Beckert


This is the blog or weblog of Axel Stefan Beckert (aka abe or XTaran) who thought, he would never start blogging... (He also once thought, that there is no reason to switch to this new ugly Netscape thing because Mosaïc works fine. That was about 1996.) Well, times change...

He was born 1975 at Villingen-Schwenningen, made his Abitur at Schwäbisch Hall, studied Computer Science with minor Biology at University of Saarland at Saarbrücken (Germany) and now lives in Zürich (Switzerland), working at the Network Security Group (NSG) of the Central IT Services (Informatikdienste) at ETH Zurich.

Links to internal pages are orange, links to related pages are blue, links to external resources are green and links to Wikipedia articles, Internet Movie Database (IMDb) entries or similar resources are bordeaux. Times are CET respective CEST (which means GMT +0100 respective +0200).

RSS Feeds

Identity Archipelago

Picture Gallery

Button Futility

Valid XHTML Valid CSS
Valid RSS Any Browser
This content is licensed under a Creative Commons License (SA 3.0 DE). Some rights reserved. Hacker Emblem
Get Mozilla Firefox! Powered by Linux!
Typed with GNU Emacs Listed at Tux Mobil
XFN Friendly Button Maker


People I know personally

Other blogs I like or read

Independent News

Interesting Planets

Web comics I like and read

Stalled Web comics I liked

Blogging Software

Blosxom Plugins I use

Bedside Reading

Just read

  • Bastian Sick: Der Dativ ist dem Genitiv sein Tod (Teile 1-3)
  • Neil Gaiman and Terry Pratchett: Good Omens (borrowed from Ermel)

Currently Reading

  • Douglas R. Hofstadter: Gödel, Escher, Bach
  • Neil Gaiman: Keine Panik (borrowed from Ermel)

Yet to read

  • Neil Stephenson: Cryptonomicon (borrowed from Ermel)

Always a good snack

  • Wolfgang Stoffels: Lokomotivbau und Dampftechnik (borrowed from Ermel)
  • Beverly Cole: Trains — The Early Years (getty images)