Blender, graphic, software, open source, Linux LibreOffice, open source, openoffice Gimp, graphic, software, open source, Linux kernel, Linux, software, open source Linux, distributions, Ubuntu, Linux Mint, Fedora, Mandriva Jamin, gpl, library, open source matroska, multimedia, container, linux pcman, file manager, linux LuninuX, distribition, Linux, open source Linux, infographic, history

Thursday, August 16, 2012

HTOP is an interactive system-monitor process-viewer written for Linux.

htop affinityHTOP is an interactive system-monitor process-viewer written for Linux. It is designed to replace the Unix program top. 

It shows a frequently updated list of the processes running on a computer, normally ordered by the amount of CPU usage. Unlike top, htop provides a full list of processes running, instead of the top resource-consuming processes. Htop uses color and gives visual information about processor, swap and memory status.

Users often deploy htop in cases where Unix top does not provide enough information about the systems processes, for example when trying to find minor memory leaks in applications. Compared to top, it provides a more convenient, cursor-controlled interface for killing processes.

Htop is written in the C programming language using the ncurses library. Its name is derived from the original author's first name.

It is possible to run htop on FreeBSD, since it can emulate Linux's procfs.

Frequently Asked Questions

The numbers in the meters occasionally change colors when the bar is full. Is this a bug?
No, that's the expected behavior. :) It's like when progress bars fill over the number on GUI apps.
The memory meter in htop says a low number, such as 9%, when top shows something like 90%! (Or: the MEM% number is low, but the bar looks almost full. What's going on?)
The number showed by the memory meter is the total memory used by processes. The additional available memory is used by the Linux kernel for buffering and disk cache, so in total almost the entire memory is in use by the kernel. I believe the number displayed by htop is a more meaningful metric of resources used: the number corresponds to the green bars; the blue and brown bars correspond to buffers and cache, respectively (as explained in the Help screen accessible through the F1 key). Numeric data about these is also available when configuring the memory meter to display as text (in the Setup screen, F2).
Why doesn't htop feature a SWAP column, like top?
It is not possible to get the exact size of used swap space of a process. Top fakes this information by making SWAP = VIRT - RES, but that is not a good metric, because other stuff such as video memory counts on VIRT as well (for example: top says my X process is using 81M of swap, but it also reports my system as a whole is using only 2M of swap. Therefore, I will not add a similar Swap column to htop because I don't know a reliable way to get this information (actually, I don't think it's possible to get an exact number, because of shared pages).
How can I be notified of new releases?
If you have a SourceForge account (it's free), you can monitor the htop package. Their system will automatically notify you when new releases are made. You can also subscribe for notifications at Freshmeat or join the htop mailing list, but be warned that I have forgotten to make announcements on those in the past (I try not to, of course).
What does the 'h' in 'htop' stand for?
Yes, I did receive emails asking this! :)
Well, the short explanation is a little obvious: the "h" stands for "Hisham", my name. :)
The long explanation is that what inspired me to write htop was
pinfo, an improved man and info reader that adds lots of features (in my machines 'man' is an alias to 'pinfo -m'). It was written by a guy called Przemek Borys. Since 'pinfo' was "a better info" and he named it "pinfo" ("Przemek's Info"), I decided to try to make "a better top" so I called it "htop" ("Hisham's top").
htop-0.4
Comparison between htop and top.
    In 'htop' you can scroll the list vertically and horizontally to see all processes and complete command lines.
    In 'top' you are subject to a delay for each unassigned key you press (especially annoying when multi-key escape sequences are triggered by accident).
    'htop' starts faster ('top' seems to collect data for a while before displaying anything).
    In 'htop' you don't need to type the process number to kill a process, in 'top' you do.
    In 'htop' you don't need to type the process number or the priority value to renice a process, in 'top' you do.
    'htop' supports mouse operation, 'top' doesn't
    'top' is older, hence, more used and tested.

Downloads.

The latest version is 1.0.1 -- you can obtain it freely in two forms:
  • Sources - source code, provided in this site
  • Binaries - pre-compiled binaries, provided by distributions
If you like htop, feel free to buy the author a beer. :-)

Sources.
   
Building htop is straightforward, as it uses GNU Autotools: the typical ./configure; make; sudo make install should do the trick. However, you may prefer to use binaries packaged for your distribution, see below.
  • Stable, tarball: Check out the latest version at the project page.
  • Development, from Subversion tree: You can fetch the work-in-progress sources for the next release using Subversion:
    svn co https://htop.svn.sourceforge.net/svnroot/htop/trunk htop
    You can also browse the svn tree online.

htop-0.5
Binaries
Packages for htop are available in most distros. Try the package manager from your system; chances are htop is available from there. Here are some distribution-specific instructions, with acknowledgements to downstream packagers who contacted me to add this information here.
  • GoboLinux: In GoboLinux you can fetch and compile htop by typing: Compile htop
    You can also download the GoboLinux binary package.
  • Debian: In Debian you can fetch htop by typing: apt-get install htop
    You can also download the binary packages from the Debian webpage.
    Thanks to Eugene Lyubimkin and Bartosz Fenski.
  • Fedora: htop is part of Fedora Extras; you can fetch it by typing: yum install htop
    Thanks to Dawid Gajownik.
  • RedHat: You can find RPM's for htop at DAG.
    Thanks to Dag Wieers. Also, you can find RHEL packages at EPEL (thanks to Josh Stone for the tip).
  • Slackware: htop is part of Slackware. You can find it in the ap/ section.
    Thanks to Patrick Volkerding for including it, and to Fred Broders for earlier packages.
  • Gentoo: In Gentoo Linux you can emerge the sys-process/htop package by typing: emerge sys-process/htop
    Thanks to Wolfram Schlich.
  • AltLinux: here are the latest RPMs for AltLinux.
    Thanks to Ilya Evseev.
  • OpenSuSE: htop is included in the OpenSuSE build service.
    Thanks to Timo Hoenig.
  • Mandriva: you can find RPMs for Mandriva (formerly Mandrake and Conectiva) and other RPM-based distributions at RpmFind.
  • KateOS: packages are available at the KateOS Pkgportal. You may enable community repositories in /etc/updateservers or using KatePKG.
    Thanks to Piotr Pelzowski.
  • Zenwalk: Htop is installed by default straight from the Zenwalk GNU/Linux ISO CDs and updates are available via its package manager, netpkg.
    Thanks to Michael Verret.
htop-1.0-screenshot

Custom Search
 
If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:

No comments:

Recent Posts

Linux News

My Blog List

BlogESfera Directorio de Blogs Hispanos - Agrega tu Blog Add to Technorati Favorites BlogItalia.it - La directory italiana dei blog Il Bloggatore Find the best blogs at Blogs.com. AddThis Social Bookmark Button page counter Mi Ping en TotalPing.com