htop - an interactive process viewer
Go to file
Christian Göttsche bda3ee2b81 Update ReadMe
Add license and repology badge, improve several wording, improve
several sections.

[skip ci]
2021-09-19 14:47:32 +02:00
.github Enable affinity support for non-Linux 2021-07-18 07:50:48 +02:00
darwin Fix typo 2021-09-18 15:55:21 +02:00
docs Fix misc typos 2021-08-08 15:10:58 +02:00
dragonflybsd Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
freebsd Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
generic Align descriptive comments 2021-07-15 06:57:24 +02:00
iwyu IWYU: add two header rules 2021-08-25 09:54:30 +02:00
linux Linux: recalculate LRS value 2021-09-12 18:20:40 +02:00
netbsd NetBSD: scale CPU frequencies 2021-09-03 12:17:45 +02:00
openbsd Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
pcp Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
scripts valgrind: rewrite ncurses suppressions 2021-09-11 00:07:23 +02:00
solaris Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
unsupported Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
zfs platform-dependent files included relative to main source directory 2021-05-10 18:40:53 +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 Simplify adding pages in one place 2021-08-22 16:15:59 +02:00
Action.h IWYU update 2021-08-25 09:54:30 +02:00
Affinity.c hwloc: use int in hwloc_bitmap_foreach_begin loop 2021-09-04 09:48:53 +02:00
Affinity.h Enable affinity support for non-Linux 2021-07-18 07:50:48 +02:00
AffinityPanel.c hwloc: use int in hwloc_bitmap_foreach_begin loop 2021-09-04 09:48:53 +02:00
AffinityPanel.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
AvailableColumnsPanel.c IWYU update 2021-08-25 09:54:30 +02:00
AvailableColumnsPanel.h IWYU update 2021-08-25 09:54:30 +02:00
AvailableMetersPanel.c Add option to change Header layout 2021-08-22 16:15:59 +02:00
AvailableMetersPanel.h IWYU update 2021-08-25 09:54:30 +02:00
BatteryMeter.c Save text buffer in Meter 2021-03-04 23:57:45 +01:00
BatteryMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +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 CPUMeter: use correct buffer size 2021-09-02 08:03:21 +02:00
CPUMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
CRT.c CRT: close backup stderr file after reset 2021-09-10 17:01:26 +02:00
CRT.h NetBSD: color process state P as running 2021-09-03 12:17:45 +02:00
CategoriesPanel.c Fix meterPanels size calculation for dynamic array allocation 2021-08-31 08:08:01 +02:00
CategoriesPanel.h Simplify adding pages in one place 2021-08-22 16:15:59 +02:00
ChangeLog Small editorial fixes to ChangeLog 2021-08-27 09:31:06 +02:00
ClockMeter.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
ClockMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
ColorsPanel.c IWYU update 2021-08-25 09:54:30 +02:00
ColorsPanel.h IWYU update 2021-08-25 09:54:30 +02:00
ColumnsPanel.c ColumnsPanel: drop unused struct declaration 2021-09-04 09:48:53 +02:00
ColumnsPanel.h IWYU update 2021-08-25 09:54:30 +02:00
CommandLine.c Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
CommandLine.h Abstract htop main function to allow for a platform binary 2021-03-25 15:56:15 +11: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 DragonFlyBSD: resolve sign comparison 2021-04-14 17:29:56 +02:00
Compat.h Request the realtime and monotonic clock times once per sample 2021-04-05 23:41:07 +02:00
DateMeter.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
DateMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
DateTimeMeter.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
DateTimeMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
DiskIOMeter.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
DiskIOMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
DisplayOptionsPanel.c ScreenManager: reduce ScreenManager_resize 2021-08-22 10:40:59 +02:00
DisplayOptionsPanel.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
DynamicColumn.c Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
DynamicColumn.h Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +02:00
DynamicMeter.c Add completion handling for dynamic meters and columns 2021-09-03 09:47:01 +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 Rework drawing of FunctionBar 2020-12-20 17:01:50 +01:00
FunctionBar.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
Hashtable.c IWYU update 2021-08-25 09:54:30 +02:00
Hashtable.h Hashtable: widen size from int to size_t 2021-01-06 16:59:28 +01:00
Header.c Header: use upper case floating point suffix 2021-09-04 09:48:53 +02:00
Header.h Header: cache number of columns in HeaderLayout_getColumns 2021-09-12 18:35:24 +02:00
HeaderLayout.h IWYU update 2021-08-25 09:54:30 +02:00
HeaderOptionsPanel.c HeaderOptionsPanel: select the current not saved option 2021-09-11 00:06:41 +02:00
HeaderOptionsPanel.h Add option to change Header layout 2021-08-22 16:15:59 +02:00
HostnameMeter.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
HostnameMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
IncSet.c Mark several non-modified pointer variables const 2021-01-11 20:12:34 +01:00
IncSet.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
InfoScreen.c netbsd: Support curses libraries without ncurses mouse support 2021-07-15 19:09:08 +02:00
InfoScreen.h InfoScreen: drop unused member 2020-12-21 22:34:50 +01:00
ListItem.c Code indentation 2021-07-15 06:57:24 +02:00
ListItem.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
LoadAverageMeter.c Rework CPU counting 2021-07-18 07:44:02 +02:00
LoadAverageMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
Macros.h Check for alloc_size attribute in configure.ac 2021-07-06 17:20:32 +02:00
MainPanel.c Abstract resize handling by adding a new Htop reaction 2021-08-22 10:40:59 +02:00
MainPanel.h Make MainPanel_pidSearch a static function 2021-04-21 20:58:28 +02:00
Makefile.am Add option to change Header layout 2021-08-22 16:15:59 +02:00
MemoryMeter.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
MemoryMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
MemorySwapMeter.c MemorySwapMeter: align with CPU meter 2021-09-10 17:09:48 +02:00
MemorySwapMeter.h Add combined memory and swap meter 2021-08-17 10:36:10 +02:00
Meter.c Simplify delay.tv_usec calculation from BenBE 2021-08-23 10:42:08 +02:00
Meter.h Meter: update documentation to match Doxygen style 2021-08-22 14:50:52 +02:00
MetersPanel.c Add option to change Header layout 2021-08-22 16:15:59 +02:00
MetersPanel.h Make all required includes explicit 2020-10-18 20:09:05 +02:00
NEWS Remove trailing whitespaces 2020-08-21 10:37:33 +02:00
NetworkIOMeter.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
NetworkIOMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
Object.c Allow meters in text mode to span empty neighbors to the right 2021-01-23 15:20:47 +01:00
Object.h Object: always include stdbool.h 2021-03-12 16:38:36 +01:00
OpenFilesScreen.c Make Infoscreens the correct height 2021-01-11 12:53:07 +01:00
OpenFilesScreen.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
OptionItem.c Use RichString_appendnAscii where possible 2021-04-26 17:51:45 +02:00
OptionItem.h Add support to change numeric options in settings screen 2020-11-25 20:46:27 +01:00
Panel.c Whitespace around operators 2021-07-15 06:57:24 +02:00
Panel.h IWYU update 2021-08-25 09:54:30 +02:00
Process.c Process_printPercentage using one color transition 2021-09-14 11:16:34 +10:00
Process.h Add a Process_printPercentage helper routine 2021-09-05 18:47:07 +02:00
ProcessList.c PCP: support for 'dynamic columns' added at runtime 2021-08-13 07:32:57 +02:00
ProcessList.h IWYU update 2021-08-25 09:54:30 +02:00
ProcessLocksScreen.c Make Infoscreens the correct height 2021-01-11 12:53:07 +01:00
ProcessLocksScreen.h IWYU update (Linux) 2020-11-19 23:51:50 +01:00
ProvideCurses.h Use consistent style for include check 2021-03-19 22:39:06 +01:00
README Update ReadMe 2021-09-19 14:47:32 +02:00
README.md Add README.md for Github 2014-02-03 09:11:39 -02:00
RichString.c IWYU update 2021-08-25 09:54:30 +02:00
RichString.h Enclose macro argument 2021-05-10 17:48:05 +02:00
ScreenManager.c Abstract resize handling by adding a new Htop reaction 2021-08-22 10:40:59 +02:00
ScreenManager.h ScreenManager: reduce ScreenManager_resize 2021-08-22 10:40:59 +02:00
Settings.c Settings: set ok when reading configuration from sysconfdir 2021-09-10 08:58:58 +02:00
Settings.h Merge branch 'header_fmt' of cgzones/htop 2021-08-23 14:56:05 +02:00
SignalsPanel.c Panel_new: reorder arguments 2021-01-04 23:12:43 +01:00
SignalsPanel.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
SwapMeter.c Remove Linux-specific cpp conditional in SwapMeter.c 2021-07-07 14:24:32 +10:00
SwapMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
SysArchMeter.c cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
SysArchMeter.h [#480] SysArchMeter to view kernel/arch info 2021-01-31 20:08:09 +01:00
TESTPLAN Small update to test plan 2021-02-13 14:04:15 +01:00
TasksMeter.c TasksMeter: save some float casts 2021-08-14 11:16:03 +02:00
TasksMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
TraceScreen.c IWYU update 2021-08-25 09:54:30 +02:00
TraceScreen.h Mark several non-modified pointer variables const 2021-01-11 20:12:34 +01:00
UptimeMeter.c UptimeMeter: treat all non-positive values as error 2021-07-18 07:47:16 +02:00
UptimeMeter.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
UsersTable.c Hashtable: use dynamic growth and use primes as size 2020-11-17 02:01:02 +01:00
UsersTable.h cleaned up includes with iwyu 2021-05-10 18:40:53 +02:00
Vector.c Avoid calling Object_isA from inside Vector_isConsistent 2020-11-17 08:06:02 +01:00
Vector.h Code indentation 2021-07-15 06:57:24 +02:00
XUtils.c Add xReallocArrayZero() helper 2021-09-11 00:04:00 +02:00
XUtils.h Add xReallocArrayZero() helper 2021-09-11 00:04:00 +02:00
autogen.sh autotools: enable warnings and cleanup 2020-09-17 21:45:11 +02:00
configure.ac Fix a typo in a configure.ac comment 2021-09-08 12:11:58 +10:00
htop.1.in linux: drop dead process field column DIRTY 2021-09-02 08:03:21 +02:00
htop.c Abstract htop main function to allow for a platform binary 2021-03-25 15:56:15 +11: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 Apply suggestions from code review 2021-08-13 16:04:25 +10:00
pcp-htop.c Resolve some Coverity scan misfires in PCP platform code 2021-06-09 17:09:29 +10: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
  • 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 to optionally dependencies (i.e. libsensors, libsystemd) is present.
  • libcap, user-space interfaces to the POSIX 1003.1e, 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 lib 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)