htop - an interactive process viewer
Go to file
Daniel Lange abaec509e6 Merge branch 'cmdline-render-cache-rework' of BenBE/htop 2022-06-01 08:00:55 +02:00
.github GH Actions: enable Werror in PCP build 2021-12-20 10:54:12 +01:00
darwin Process: Display single digit precision for CPU% greater than 99.9% 2022-05-26 15:03:39 +02:00
docs Fix typo 2022-05-31 22:21:52 +02:00
dragonflybsd Process: Display single digit precision for CPU% greater than 99.9% 2022-05-26 15:03:39 +02:00
freebsd Implement FreeBSD support for minimum ZFS ARC size 2022-05-30 07:50:57 +02:00
generic Implement FreeBSD support for minimum ZFS ARC size 2022-05-30 07:50:57 +02:00
iwyu IWYU: add two header rules 2021-08-25 09:54:30 +02:00
linux Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
netbsd Process: Display single digit precision for CPU% greater than 99.9% 2022-05-26 15:03:39 +02:00
openbsd Process: Display single digit precision for CPU% greater than 99.9% 2022-05-26 15:03:39 +02:00
pcp Implement PCP support for minimum ZFS ARC size 2022-05-30 07:50:57 +02:00
scripts Suppress reporting memory leaks originating from libdevstat 2021-10-14 23:25:19 +02:00
solaris Fix process time scaling error on Solaris 2022-05-26 15:31:30 +02:00
unsupported Process: Display single digit precision for CPU% greater than 99.9% 2022-05-26 15:03:39 +02:00
zfs consider only shrinkable ZFS ARC as cache on Linux 2022-05-30 07:50:57 +02:00
.editorconfig Add `trim_trailing_whitespace` to editorconfig 2019-10-31 11:39:57 -05:00
.gitignore docs: updates and new manual page for pcp-htop 2021-08-03 14:11:21 +10:00
.travis.yml travis-ci: update 2021-09-02 08:03:21 +02:00
AUTHORS Update AUTHORS file with htop-dev team 2020-12-05 11:07:32 +01:00
Action.c Merge branch 'fix-allBranchesCollapsed' of tanriol/htop 2022-05-30 10:37:19 +02:00
Action.h Introduce screen tabs 2021-12-07 17:04:49 +11:00
Affinity.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Affinity.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
AffinityPanel.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
AffinityPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
AvailableColumnsPanel.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
AvailableColumnsPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
AvailableMetersPanel.c Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
AvailableMetersPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
BatteryMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
BatteryMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
CONTRIBUTING.md Adjust to current label reality and the fact that Github can't search for multiple labels ORed ... yet. 2021-05-14 11:29:29 +02:00
COPYING Remove license excemption for PLPA and update GPL-2 license text 2021-08-26 11:37:36 +02:00
CPUMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
CPUMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
CRT.c Call mousemask(3X) to truly enable or disable mouse control 2022-05-19 20:23:22 +02:00
CRT.h Call mousemask(3X) to truly enable or disable mouse control 2022-05-19 20:23:22 +02:00
CategoriesPanel.c Introduce screen tabs 2021-12-07 17:04:49 +11:00
CategoriesPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
ChangeLog Add changelog entries for pending htop-3.2.0 release, update version 2022-04-29 18:03:53 +10:00
ClockMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
ClockMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
ColorsPanel.c Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
ColorsPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
ColumnsPanel.c Introduce screen tabs 2021-12-07 17:04:49 +11:00
ColumnsPanel.h Introduce screen tabs 2021-12-07 17:04:49 +11:00
CommandLine.c Merge branch 'improve-filter-label' into main 2022-04-14 16:44:51 +02:00
CommandLine.h Early program termination only from main() 2021-10-31 15:07:00 +01:00
CommandScreen.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
CommandScreen.h Make all required includes explicit 2020-10-18 20:09:05 +02:00
Compat.c Cleanup: Fix misc styleguide issues 2021-11-04 23:13:38 +01:00
Compat.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
DateMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
DateMeter.h Update remaining license headers to explicitly say GPLv2+ 2021-09-24 20:28:26 +02:00
DateTimeMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
DateTimeMeter.h Update remaining license headers to explicitly say GPLv2+ 2021-09-24 20:28:26 +02:00
DiskIOMeter.c IOMeters: rework initial display 2021-12-08 19:08:20 +01:00
DiskIOMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
DisplayOptionsPanel.c Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
DisplayOptionsPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
DynamicColumn.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
DynamicColumn.h Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
DynamicMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
DynamicMeter.h Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
EnvScreen.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
EnvScreen.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
FunctionBar.c Introduce screen tabs 2021-12-07 17:04:49 +11:00
FunctionBar.h Introduce screen tabs 2021-12-07 17:04:49 +11:00
Hashtable.c Hashtable: fix handling of NULL pointer in Hashtable_dump 2022-05-06 06:34:17 +02:00
Hashtable.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Header.c Do not leave empty last column in header 2021-12-09 17:52:00 +01:00
Header.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
HeaderLayout.h Fix a compile warning: comparison of unsigned enum expression < 0 is always false 2022-04-05 09:23:03 +02:00
HeaderOptionsPanel.c Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
HeaderOptionsPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
HostnameMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
HostnameMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
IncSet.c Improve String_contains_i to allow for multiple terms 2022-03-25 17:19:59 +01:00
IncSet.h Introduce screen tabs 2021-12-07 17:04:49 +11:00
InfoScreen.c Improve String_contains_i to allow for multiple terms 2022-03-25 17:19:59 +01:00
InfoScreen.h InfoScreen: drop unused member 2020-12-21 22:34:50 +01:00
ListItem.c Introduce screen tabs 2021-12-07 17:04:49 +11:00
ListItem.h Introduce screen tabs 2021-12-07 17:04:49 +11:00
LoadAverageMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
LoadAverageMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Macros.h Check for alloc_size attribute in configure.ac 2021-07-06 17:20:32 +02:00
MainPanel.c Improve MainPanel Label on active inc filter (Filter <-> FILTER) 2022-03-25 14:51:14 +01:00
MainPanel.h Improve MainPanel Label on active inc filter (Filter <-> FILTER) 2022-03-25 14:51:14 +01:00
Makefile.am Introduce screen tabs 2021-12-07 17:04:49 +11:00
MemoryMeter.c Ensure consistent reporting of MemoryMeter used memory 2021-10-12 17:46:44 +11:00
MemoryMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
MemorySwapMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
MemorySwapMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Meter.c Do not leave empty last column in header 2021-12-09 17:52:00 +01:00
Meter.h IOMeters: rework initial display 2021-12-08 19:08:20 +01:00
MetersPanel.c Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
MetersPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
NEWS Remove trailing whitespaces 2020-08-21 10:37:33 +02:00
NetworkIOMeter.c IOMeters: rework initial display 2021-12-08 19:08:20 +01:00
NetworkIOMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
Object.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Object.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
OpenFilesScreen.c Use of NULL in execlp() must have a pointer cast. 2022-05-19 18:42:44 +08:00
OpenFilesScreen.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
OptionItem.c Add some headers in the Setup -> Display options panel 2022-05-27 19:47:06 +02:00
OptionItem.h Add some headers in the Setup -> Display options panel 2022-05-27 19:47:06 +02:00
Panel.c Panel: initialize cursorOn member 2021-12-08 12:40:13 +01:00
Panel.h Introduce screen tabs 2021-12-07 17:04:49 +11:00
Process.c Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
Process.h Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
ProcessList.c Merge branch 'fix-allBranchesCollapsed' of tanriol/htop 2022-05-30 10:37:19 +02:00
ProcessList.h ProcessList.h: remove `ProcessList_remove` 2022-05-05 10:00:34 +02:00
ProcessLocksScreen.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
ProcessLocksScreen.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
ProvideCurses.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
README README: Add macOS build dependency install command 2022-04-14 20:28:11 +02:00
README.md Add README.md for Github 2014-02-03 09:11:39 -02:00
RichString.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
RichString.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
ScreenManager.c ProcessList_buildTree: produce sorted tree 2022-02-13 19:50:16 +01:00
ScreenManager.h Introduce screen tabs 2021-12-07 17:04:49 +11:00
ScreensPanel.c Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
ScreensPanel.h Make sure License is correctly specified as GNU GPLv2+ in some more file headers 2022-03-14 07:33:40 +01:00
Settings.c Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
Settings.h Refactor code for rendering command line cache 2022-05-31 13:55:43 +02:00
SignalsPanel.c Fix Solaris / OmniOS build 2022-05-06 15:22:08 +02:00
SignalsPanel.h Fix Solaris / OmniOS build 2022-05-06 15:22:08 +02:00
SwapMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
SwapMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
SysArchMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
SysArchMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
TESTPLAN Small update to test plan 2021-02-13 14:04:15 +01:00
TasksMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
TasksMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
TraceScreen.c Use of NULL in execlp() must have a pointer cast. 2022-05-19 18:42:44 +08:00
TraceScreen.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
UptimeMeter.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
UptimeMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
UsersTable.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
UsersTable.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Vector.c Fix heap buffer overflow in Vector_compact 2022-05-10 12:12:46 +02:00
Vector.h ProcessList: fix quadratic process removal when scanning 2022-05-05 09:17:51 +02:00
XUtils.c Always abort on overflow in String_cat 2022-05-05 09:19:14 +02:00
XUtils.h Improve String_contains_i to allow for multiple terms 2022-03-25 17:19:59 +01:00
autogen.sh autotools: enable warnings and cleanup 2020-09-17 21:45:11 +02:00
configure.ac Add changelog entries for pending htop-3.2.0 release, update version 2022-04-29 18:03:53 +10:00
htop.1.in Document screen tab switching (TAB, Shift-TAB keys) 2022-04-30 17:06:59 +02:00
htop.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
htop.desktop Add danish translation to htop.desktop 2019-02-19 01:25:52 +01:00
htop.png Update htop logo, provide .svg file as well 2020-12-05 13:46:34 +01:00
htop.svg Update htop logo, provide .svg file as well 2020-12-05 13:46:34 +01:00
pcp-htop.5.in Year 2022 updates 2022-01-03 18:01:18 +01:00
pcp-htop.c Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
test_spec.lua Remove trailing whitespaces 2020-08-21 10:37:33 +02:00

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 (v2.21 or later)
  • 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

Archlinux/Manjaro

sudo pacman -S ncurses automake autoconf gcc

macOS

brew install ncurses 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) or, at your option, any later version.