htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
Clone or download
alanbarr and hishamhm Fix printf() unsigned placeholders
Unsigned numbers should be using "%u".

Raised by cppcheck
Latest commit b7b4200 Oct 13, 2018
Permalink
Failed to load latest commit information.
darwin Prevent possible NULL pointer deference Oct 30, 2018
dragonflybsd Security review: check results of snprintf. Jul 27, 2017
freebsd Security review: check results of snprintf. Jul 27, 2017
linux Linux: fix CPU count Aug 24, 2018
openbsd OpenBSD: make the STARTTIME column display correctly (#815) Aug 19, 2018
scripts MakeHeader.py: Fix for non-utf8 environments (#770) Apr 5, 2018
solaris Solaris: update proc state letters to reflect Solaris usage Apr 5, 2018
unsupported Remove unused function from unsupported/ Feb 19, 2018
.editorconfig add editorconfig file to give hints to editors Oct 5, 2015
.gitignore Unstage/gitignore INSTALL since it's regenerated by autogen.sh Jun 13, 2018
.travis.yml travis-ci should really detect autogen.sh... Nov 19, 2015
AUTHORS Initial import. Mar 4, 2006
Action.c Fix virtualization color in help screen Jun 13, 2018
Action.h Auto-follow process after a search. May 5, 2016
Affinity.c Portable affinity using hwloc Feb 14, 2016
Affinity.h Portable affinity using hwloc Feb 14, 2016
AffinityPanel.c Security review: check results of snprintf. Jul 27, 2017
AffinityPanel.h Sorry about the mega-patch. Jan 22, 2015
AvailableColumnsPanel.c Security review: check results of snprintf. Jul 27, 2017
AvailableColumnsPanel.h Sorry about the mega-patch. Jan 22, 2015
AvailableMetersPanel.c Security review: check results of snprintf. Jul 27, 2017
AvailableMetersPanel.h Sorry about the mega-patch. Jan 22, 2015
BatteryMeter.c Security review: check results of snprintf. Jul 27, 2017
BatteryMeter.h Move platform-dependent parts of Linux battery meter. Nov 27, 2014
CONTRIBUTING.md Add Contributing Guide! Feb 26, 2018
COPYING Resolve license incompatibility issues, Feb 24, 2010
CPUMeter.c Security review: check results of snprintf. Jul 27, 2017
CPUMeter.h Calculate CPU averages on Darwin (See #295). Oct 23, 2015
CRT.c Fix color behavior on some terminals. Feb 5, 2018
CRT.h Fix color behavior on some terminals. Feb 5, 2018
CategoriesPanel.c Mark some things as const Jul 23, 2017
CategoriesPanel.h Sorry about the mega-patch. Jan 22, 2015
ChangeLog Update ChangeLog Apr 10, 2018
CheckItem.c Avoid future confusions with how default values are set. Aug 12, 2015
CheckItem.h Avoid future confusions with how default values are set. Aug 12, 2015
ClockMeter.c Rename Meter.setValues() functions to updateValues() May 4, 2016
ClockMeter.h Changes in object model: separate class objects to store vtable. Also… Dec 5, 2012
ColorsPanel.c Fix color behavior on some terminals. Feb 5, 2018
ColorsPanel.h Make the implementation of color schemes declarative. Feb 3, 2015
ColumnsPanel.c fix fallthough comments for GCC 7.x Oct 23, 2017
ColumnsPanel.h Sorry about the mega-patch. Jan 22, 2015
DisplayOptionsPanel.c Mark some things as const Jul 23, 2017
DisplayOptionsPanel.h Changes in object model: separate class objects to store vtable. Also… Dec 5, 2012
EnvScreen.c Security review: make privilege dropping-restoring optional. Jul 26, 2017
EnvScreen.h refactor *Screen classes, add InfoScreen superclass Jan 12, 2016
FunctionBar.c Mark some things as const Jul 23, 2017
FunctionBar.h Mark some things as const Jul 23, 2017
Hashtable.c Check for failure in allocations. Feb 2, 2016
Hashtable.h major header cleanup Dec 26, 2011
Header.c Security review: check results of snprintf. Jul 27, 2017
Header.h Fix macro Header_forEachColumn May 7, 2016
HostnameMeter.c Rename Meter.setValues() functions to updateValues() May 4, 2016
HostnameMeter.h Changes in object model: separate class objects to store vtable. Also… Dec 5, 2012
IncSet.c Mark some things as const Jul 23, 2017
IncSet.h Auto-follow process after a search. May 5, 2016
InfoScreen.c Replace size_t with int/void* union Feb 18, 2018
InfoScreen.h refactor *Screen classes, add InfoScreen superclass Jan 12, 2016
ListItem.c Security review: check results of snprintf. Jul 27, 2017
ListItem.h Sorry about the mega-patch. Jan 22, 2015
LoadAverageMeter.c Security review: check results of snprintf. Jul 27, 2017
LoadAverageMeter.h Changes in object model: separate class objects to store vtable. Also… Dec 5, 2012
MainPanel.c Replace size_t with int/void* union Feb 18, 2018
MainPanel.h Replace size_t with int/void* union Feb 18, 2018
Makefile.am Disable 'make dist' when pkg.m4 is unused in configure May 23, 2018
MemoryMeter.c Rename Meter.setValues() functions to updateValues() May 4, 2016
MemoryMeter.h Changes in object model: separate class objects to store vtable. Also… Dec 5, 2012
Meter.c Fix out-of-bounds read Feb 18, 2018
Meter.h Rename Meter.setValues() functions to updateValues() May 4, 2016
MetersPanel.c fix fallthough comments for GCC 7.x Oct 23, 2017
MetersPanel.h Mouse-friendly functions bar for meters panel Jul 16, 2016
NEWS cleanup old stuff Nov 21, 2011
Object.c Check for failure in allocations. Feb 2, 2016
Object.h Check for failure in allocations. Feb 2, 2016
OpenFilesScreen.c Use fork/exec instead of popen to run lsof (#757) Mar 16, 2018
OpenFilesScreen.h refactor *Screen classes, add InfoScreen superclass Jan 12, 2016
Panel.c Handle unexpected values for character passed to isalnum Feb 5, 2018
Panel.h Added Ctrl+A and Ctrl+E to go to beginning and end of line. Jun 15, 2016
Process.c Fix printf() unsigned placeholders Oct 30, 2018
Process.h Collapse current subtree pressing Backspace Apr 5, 2018
ProcessList.c Collapse current subtree pressing Backspace Apr 5, 2018
ProcessList.h Portable affinity using hwloc Feb 14, 2016
README Point users to the official release tarballs. Aug 23, 2016
README.md Add README.md for Github Feb 3, 2014
RichString.c Protect against overflows in RichString_setAttrn Feb 26, 2018
RichString.h Protect against overflows in RichString_setAttrn Feb 26, 2018
ScreenManager.c Remove duplicated if condition Oct 30, 2018
ScreenManager.h Move FunctionBar inside Panel Mar 23, 2015
Settings.c Make settings file finding sequence more straightforward Feb 18, 2018
Settings.h Merge pull request #148 from nckx/display-basename Aug 12, 2015
SignalsPanel.c Fix overflow for signals >= 100. Mar 25, 2018
SignalsPanel.h Changes in object model: separate class objects to store vtable. Also… Dec 5, 2012
StringUtils.c free(NULL) is a valid no-op, so let's make String_freeArray(NULL) val… Aug 24, 2016
StringUtils.h Optimize Strings_startWith() Aug 11, 2016
SwapMeter.c Rename Meter.setValues() functions to updateValues() May 4, 2016
SwapMeter.h use dynamic units for text display Aug 27, 2015
TESTPLAN Fix failing stuff. Apr 9, 2015
TasksMeter.c htop scans /proc to determine how many running tasks exist. Since that Jan 23, 2018
TasksMeter.h Changes in object model: separate class objects to store vtable. Also… Dec 5, 2012
TraceScreen.c strace: increase string length Mar 25, 2018
TraceScreen.h refactor *Screen classes, add InfoScreen superclass Jan 12, 2016
UptimeMeter.c Security review: check results of snprintf. Jul 27, 2017
UptimeMeter.h Move UptimeMeter back into cross-platform code. Nov 27, 2014
UsersTable.c Check for failure in allocations. Feb 2, 2016
UsersTable.h major header cleanup Dec 26, 2011
Vector.c Optimize Vector_size on non-debug builds Feb 5, 2018
Vector.h Optimize Vector_size on non-debug builds Feb 5, 2018
XAlloc.c Security review: check results of snprintf. Jul 27, 2017
XAlloc.h Security review: check results of snprintf. Jul 27, 2017
autogen.sh Simplify autogen.sh Feb 14, 2016
configure.ac Disable 'make dist' when pkg.m4 is unused in configure May 23, 2018
htop.1.in Mention the "c" key (tag subtree) in the man Jun 2, 2018
htop.c htop.c: remove unused "--io" / "-i" (#811) Aug 25, 2018
htop.desktop Improve Catalan translation for desktop file (#828) Aug 24, 2018
htop.h Sorry about the mega-patch. Jan 22, 2015
htop.png Updated icon! Apr 9, 2014
test_spec.lua Fix typos, by @Gelma. Aug 30, 2016

README.md

Build Status PayPal donate

htop

by Hisham Muhammad hisham@gobolinux.org (2004 - 2016)

Introduction

This is htop, an interactive process viewer. It requires ncurses. It is developed primarily on Linux, but we also have code for running under FreeBSD and Mac OS X (help and testing are wanted for these platforms!)

This software has evolved considerably over the years, and is reasonably complete, but there is always room for improvement.

Comparison between htop and classic top

  • In htop you can scroll the list vertically and horizontally to see all processes and full 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.
  • In htop you can kill multiple processes at once.
  • top is older, hence, more tested.

Compilation instructions

This program is distributed as a standard autotools-based package. See the INSTALL file for detailed instructions.

When compiling from a release tarball, run:

./configure && make

For compiling sources downloaded from the Git repository, run:

./autogen.sh && ./configure && make

By default make install will install into /usr/local, for changing the path use ./configure --prefix=/some/path.

See the manual page (man htop) or the on-line help ('F1' or 'h' inside htop) for a list of supported key commands.

If not all keys work check your curses configuration.

License

GNU General Public License, version 2 (GPL-2.0)