You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Nathan Scott 3d3474b3fc Adjust Makefile.am macro definitions for older automake versions 5 years ago
.github Enable affinity support for non-Linux 5 years ago
darwin Fix typo 5 years ago
docs Fix misc typos 5 years ago
dragonflybsd Add completion handling for dynamic meters and columns 5 years ago
freebsd Add completion handling for dynamic meters and columns 5 years ago
generic Align descriptive comments 5 years ago
iwyu IWYU: add two header rules 5 years ago
linux Linux: recalculate LRS value 5 years ago
netbsd NetBSD: scale CPU frequencies 5 years ago
openbsd Add completion handling for dynamic meters and columns 5 years ago
pcp Add completion handling for dynamic meters and columns 5 years ago
scripts valgrind: rewrite ncurses suppressions 5 years ago
solaris Add completion handling for dynamic meters and columns 5 years ago
unsupported Add completion handling for dynamic meters and columns 5 years ago
zfs platform-dependent files included relative to main source directory 5 years ago
.editorconfig
.gitignore docs: updates and new manual page for pcp-htop 5 years ago
.travis.yml travis-ci: update 5 years ago
AUTHORS Update AUTHORS file with htop-dev team 5 years ago
Action.c Simplify adding pages in one place 5 years ago
Action.h IWYU update 5 years ago
Affinity.c hwloc: use int in hwloc_bitmap_foreach_begin loop 5 years ago
Affinity.h Enable affinity support for non-Linux 5 years ago
AffinityPanel.c hwloc: use int in hwloc_bitmap_foreach_begin loop 5 years ago
AffinityPanel.h cleaned up includes with iwyu 5 years ago
AvailableColumnsPanel.c IWYU update 5 years ago
AvailableColumnsPanel.h IWYU update 5 years ago
AvailableMetersPanel.c Add option to change Header layout 5 years ago
AvailableMetersPanel.h IWYU update 5 years ago
BatteryMeter.c Save text buffer in Meter 5 years ago
BatteryMeter.h cleaned up includes with iwyu 5 years ago
CONTRIBUTING.md Adjust to current label reality and the fact that Github can't search for multiple labels ORed ... yet. 5 years ago
COPYING Remove license excemption for PLPA and update GPL-2 license text 5 years ago
CPUMeter.c Header: do not let multi-column meters expand to empty neighbors 5 years ago
CPUMeter.h cleaned up includes with iwyu 5 years ago
CRT.c Use libunwind for printing backtrace 5 years ago
CRT.h NetBSD: color process state P as running 5 years ago
CategoriesPanel.c Fix meterPanels size calculation for dynamic array allocation 5 years ago
CategoriesPanel.h Simplify adding pages in one place 5 years ago
ChangeLog Small editorial fixes to ChangeLog 5 years ago
ClockMeter.c cleaned up includes with iwyu 5 years ago
ClockMeter.h cleaned up includes with iwyu 5 years ago
ColorsPanel.c IWYU update 5 years ago
ColorsPanel.h IWYU update 5 years ago
ColumnsPanel.c ColumnsPanel: drop unused struct declaration 5 years ago
ColumnsPanel.h IWYU update 5 years ago
CommandLine.c Add completion handling for dynamic meters and columns 5 years ago
CommandLine.h Abstract htop main function to allow for a platform binary 5 years ago
CommandScreen.c cleaned up includes with iwyu 5 years ago
CommandScreen.h Make all required includes explicit 5 years ago
Compat.c DragonFlyBSD: resolve sign comparison 5 years ago
Compat.h Request the realtime and monotonic clock times once per sample 5 years ago
DateMeter.c cleaned up includes with iwyu 5 years ago
DateMeter.h cleaned up includes with iwyu 5 years ago
DateTimeMeter.c cleaned up includes with iwyu 5 years ago
DateTimeMeter.h cleaned up includes with iwyu 5 years ago
DiskIOMeter.c cleaned up includes with iwyu 5 years ago
DiskIOMeter.h cleaned up includes with iwyu 5 years ago
DisplayOptionsPanel.c ScreenManager: reduce ScreenManager_resize 5 years ago
DisplayOptionsPanel.h cleaned up includes with iwyu 5 years ago
DynamicColumn.c Add completion handling for dynamic meters and columns 5 years ago
DynamicColumn.h Add completion handling for dynamic meters and columns 5 years ago
DynamicMeter.c Add completion handling for dynamic meters and columns 5 years ago
DynamicMeter.h Add completion handling for dynamic meters and columns 5 years ago
EnvScreen.c cleaned up includes with iwyu 5 years ago
EnvScreen.h cleaned up includes with iwyu 5 years ago
FunctionBar.c Rework drawing of FunctionBar 5 years ago
FunctionBar.h cleaned up includes with iwyu 5 years ago
Hashtable.c IWYU update 5 years ago
Hashtable.h Hashtable: widen size from int to size_t 5 years ago
Header.c Header: do not let multi-column meters expand to empty neighbors 5 years ago
Header.h Header: cache number of columns in HeaderLayout_getColumns 5 years ago
HeaderLayout.h IWYU update 5 years ago
HeaderOptionsPanel.c HeaderOptionsPanel: select the current not saved option 5 years ago
HeaderOptionsPanel.h Add option to change Header layout 5 years ago
HostnameMeter.c cleaned up includes with iwyu 5 years ago
HostnameMeter.h cleaned up includes with iwyu 5 years ago
IncSet.c Mark several non-modified pointer variables const 5 years ago
IncSet.h cleaned up includes with iwyu 5 years ago
InfoScreen.c netbsd: Support curses libraries without ncurses mouse support 5 years ago
InfoScreen.h InfoScreen: drop unused member 5 years ago
ListItem.c Code indentation 5 years ago
ListItem.h cleaned up includes with iwyu 5 years ago
LoadAverageMeter.c Rework CPU counting 5 years ago
LoadAverageMeter.h cleaned up includes with iwyu 5 years ago
Macros.h Check for alloc_size attribute in configure.ac 5 years ago
MainPanel.c MainPanel: do not reset on disabled mouse events 5 years ago
MainPanel.h Make MainPanel_pidSearch a static function 5 years ago
Makefile.am Adjust Makefile.am macro definitions for older automake versions 5 years ago
MemoryMeter.c cleaned up includes with iwyu 5 years ago
MemoryMeter.h cleaned up includes with iwyu 5 years ago
MemorySwapMeter.c Header: do not let multi-column meters expand to empty neighbors 5 years ago
MemorySwapMeter.h Add combined memory and swap meter 5 years ago
Meter.c Simplify delay.tv_usec calculation from BenBE 5 years ago
Meter.h Header: do not let multi-column meters expand to empty neighbors 5 years ago
MetersPanel.c Add option to change Header layout 5 years ago
MetersPanel.h Make all required includes explicit 5 years ago
NEWS Remove trailing whitespaces 6 years ago
NetworkIOMeter.c cleaned up includes with iwyu 5 years ago
NetworkIOMeter.h cleaned up includes with iwyu 5 years ago
Object.c Allow meters in text mode to span empty neighbors to the right 5 years ago
Object.h Object: always include stdbool.h 5 years ago
OpenFilesScreen.c Make Infoscreens the correct height 5 years ago
OpenFilesScreen.h cleaned up includes with iwyu 5 years ago
OptionItem.c Use RichString_appendnAscii where possible 5 years ago
OptionItem.h Add support to change numeric options in settings screen 5 years ago
Panel.c Whitespace around operators 5 years ago
Panel.h IWYU update 5 years ago
Process.c Process_printPercentage using one color transition 5 years ago
Process.h Add a Process_printPercentage helper routine 5 years ago
ProcessList.c PCP: support for 'dynamic columns' added at runtime 5 years ago
ProcessList.h IWYU update 5 years ago
ProcessLocksScreen.c Make Infoscreens the correct height 5 years ago
ProcessLocksScreen.h IWYU update (Linux) 5 years ago
ProvideCurses.h Use consistent style for include check 5 years ago
README Some minor editorial changes to the readme 5 years ago
README.md
RichString.c IWYU update 5 years ago
RichString.h Enclose macro argument 5 years ago
ScreenManager.c Abstract resize handling by adding a new Htop reaction 5 years ago
ScreenManager.h ScreenManager: reduce ScreenManager_resize 5 years ago
Settings.c Settings: set ok when reading configuration from sysconfdir 5 years ago
Settings.h Merge branch 'header_fmt' of cgzones/htop 5 years ago
SignalsPanel.c Panel_new: reorder arguments 5 years ago
SignalsPanel.h cleaned up includes with iwyu 5 years ago
SwapMeter.c Remove Linux-specific cpp conditional in SwapMeter.c 5 years ago
SwapMeter.h cleaned up includes with iwyu 5 years ago
SysArchMeter.c cleaned up includes with iwyu 5 years ago
SysArchMeter.h [#480] SysArchMeter to view kernel/arch info 5 years ago
TESTPLAN Small update to test plan 5 years ago
TasksMeter.c TasksMeter: save some float casts 5 years ago
TasksMeter.h cleaned up includes with iwyu 5 years ago
TraceScreen.c IWYU update 5 years ago
TraceScreen.h Mark several non-modified pointer variables const 5 years ago
UptimeMeter.c UptimeMeter: treat all non-positive values as error 5 years ago
UptimeMeter.h cleaned up includes with iwyu 5 years ago
UsersTable.c Hashtable: use dynamic growth and use primes as size 5 years ago
UsersTable.h cleaned up includes with iwyu 5 years ago
Vector.c Avoid calling Object_isA from inside Vector_isConsistent 5 years ago
Vector.h Code indentation 5 years ago
XUtils.c Add xReallocArrayZero() helper 5 years ago
XUtils.h Add xReallocArrayZero() helper 5 years ago
autogen.sh autotools: enable warnings and cleanup 6 years ago
configure.ac Update version to 3.1.1-dev 5 years ago
htop.1.in linux: drop dead process field column DIRTY 5 years ago
htop.c Abstract htop main function to allow for a platform binary 5 years ago
htop.desktop
htop.png Update htop logo, provide .svg file as well 5 years ago
htop.svg Update htop logo, provide .svg file as well 5 years ago
pcp-htop.5.in Apply suggestions from code review 5 years ago
pcp-htop.c Resolve some Coverity scan misfires in PCP platform code 5 years ago
test_spec.lua Remove trailing whitespaces 6 years ago

README.md

htop logo

CI Coverity Scan Build Status Mailing List IRC #htop GitHub Release Packaging status License: GPL v2

Screenshot of htop

Introduction

htop is a cross-platform interactive process viewer.

htop allows scrolling the list of processes vertically and horizontally to see their full command lines and related information like memory and CPU consumption. Also system wide information, like load average or swap usage, is shown.

The information displayed is configurable through a graphical setup and can be sorted and filtered interactively.

Tasks related to processes (e.g. killing and renicing) can be done without entering their PIDs.

Running htop requires ncurses libraries, typically named libncurses(w).

htop is written in C.

For more information and details visit htop.dev.

Build instructions

Prerequisite

List of build-time dependencies:

  • standard GNU autotools-based C toolchain
    • C99 compliant compiler
    • autoconf
    • autotools
  • ncurses

Note about ncurses:

htop requires ncurses 6.0. Be aware the appropriate package is sometimes still called libncurses5 (on Debian/Ubuntu). Also ncurses usually comes in two flavours:

  • With Unicode support.
  • Without Unicode support.

This is also something that is reflected in the package name on Debian/Ubuntu (via the additional 'w' - 'w'ide character support).

List of additional build-time dependencies (based on feature flags):

  • sensors
  • hwloc
  • libcap
  • libnl-3

Install these and other required packages for C development from your package manager.

Debian/Ubuntu

sudo apt install libncursesw5-dev autotools-dev autoconf build-essential

Fedora/RHEL

sudo dnf install ncurses-devel automake autoconf gcc

Compile from source:

To compile from source, download from the Git repository (git clone or downloads from GitHub releases), then run:

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

Install

To install on the local system run make install. By default make install installs into /usr/local. To change this path use ./configure --prefix=/some/path.

Build Options

htop has several build-time options to enable/disable additional features.

Generic

  • --enable-unicode: enable Unicode support
    • dependency: libncursesw
    • default: yes
  • --enable-affinity: enable sched_setaffinity(2) and sched_getaffinity(2) for affinity support; conflicts with hwloc
    • default: check
  • --enable-hwloc: enable hwloc support for CPU affinity; disables affinity support
    • dependency: libhwloc
    • default: no
  • --enable-static: build a static htop binary; hwloc and delay accounting are not supported
    • default: no
  • --enable-debug: Enable asserts and internal sanity checks; implies a performance penalty
    • default: no

Performance Co-Pilot

  • --enable-pcp: enable Performance Co-Pilot support via a new pcp-htop utility
    • dependency: libpcp
    • default: no

Linux

  • --enable-sensors: enable libsensors(3) support for reading temperature data
    • dependencies: libsensors-dev(build-time), at runtime libsensors is loaded via dlopen(3) if available
    • default: check
  • --enable-capabilities: enable Linux capabilities support
    • dependency: libcap
    • default: check
  • --with-proc: location of a Linux-compatible proc filesystem
    • default: /proc
  • --enable-openvz: enable OpenVZ support
    • default: no
  • --enable-vserver: enable VServer support
    • default: no
  • --enable-ancient-vserver: enable ancient VServer support (implies --enable-vserver)
    • default: no
  • --enable-delayacct: enable Linux delay accounting support
    • dependencies: pkg-config(build-time), libnl-3 and libnl-genl-3
    • default: check

Runtime dependencies:

htop has a set of fixed minimum runtime dependencies, which is kept as minimal as possible:

  • ncurses libraries for terminal handling (wide character support).

Runtime optional dependencies:

htop has a set of fixed optional dependencies, depending on build/configure option used:

Linux

  • libdl, if not building a static binary, is always required when support for optional dependencies (i.e. libsensors, libsystemd) is present.
  • libcap, user-space interfaces to POSIX 1003.1e capabilities, is always required when --enable-capabilities was used to configure htop.
  • libsensors, readout of temperatures and CPU speeds, is optional even when --enable-sensors was used to configure htop.
  • libsystemd is optional when --enable-static was not used to configure htop. If building statically and libsystemd is not found by configure, support for the systemd meter is disabled entirely.

htop checks for the availability of the actual runtime libraries as htop runs.

BSD

On most BSD systems kvm is a requirement to read kernel information.

More information on required and optional dependencies can be found in configure.ac.

Usage

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

Support

If you have trouble running htop please consult your operating system / Linux distribution documentation for getting support and filing bugs.

Bugs, development feedback

We have a development mailing list. Feel free to subscribe for release announcements or asking questions on the development of htop.

You can also join our IRC channel #htop on Libera.Chat and talk to the developers there.

If you have found an issue within the source of htop, please check whether this has already been reported in our GitHub issue tracker. If not, please file a new issue describing the problem you have found, the potential location in the source code you are referring to and a possible fix if available.

History

htop was invented, developed and maintained by Hisham Muhammad from 2004 to 2019. His legacy repository has been archived to preserve the history.

In 2020 a team took over the development amicably and continues to maintain htop collaboratively.

License

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