blob: e6edc1656b3975ae6a64d1e8a0c4c6e3364153cc [file] [log] [blame]
Christian Göttschebda3ee22021-09-19 13:59:58 +02001# [![htop logo](htop.png)](https://htop.dev)
Tomas Barton01edfcf2016-02-11 19:17:00 +01002
Nathan Scotta7a5e352020-08-20 13:16:31 +10003[![CI](https://github.com/htop-dev/htop/workflows/CI/badge.svg)](https://github.com/htop-dev/htop/actions)
Nathan Scottb5e69522020-08-27 10:42:40 +10004[![Coverity Scan Build Status](https://scan.coverity.com/projects/21665/badge.svg)](https://scan.coverity.com/projects/21665)
Nathan Scotta7a5e352020-08-20 13:16:31 +10005[![Mailing List](https://img.shields.io/badge/Mailing%20List-htop-blue.svg)](https://groups.io/g/htop)
BenBE78793c52021-06-16 14:54:20 +02006[![IRC #htop](https://img.shields.io/badge/IRC-htop-blue.svg)](https://web.libera.chat/#htop)
Christian Göttschebda3ee22021-09-19 13:59:58 +02007[![GitHub Release](https://img.shields.io/github/release/htop-dev/htop.svg)](https://github.com/htop-dev/htop/releases/latest)
8[![Packaging status](https://repology.org/badge/tiny-repos/htop.svg)](https://repology.org/project/htop/versions)
Daniel Lange61227792021-09-22 11:28:31 +02009[![License: GPL v2+](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](COPYING?raw=true)
Hisham Muhammad369bef22014-04-05 19:56:35 -030010
Bart Joy816734e2020-10-01 20:08:49 +130011![Screenshot of htop](docs/images/screenshot.png?raw=true)
12
Samuel Williams746a5f22020-09-02 11:54:17 +120013## Introduction
Hisham Muhammadd6231ba2006-03-04 18:16:49 +000014
Nathan Scotta7a5e352020-08-20 13:16:31 +100015`htop` is a cross-platform interactive process viewer.
Hisham Muhammadd6231ba2006-03-04 18:16:49 +000016
Daniel Lange3a1c6982020-09-16 17:54:25 +020017`htop` allows scrolling the list of processes vertically and horizontally to see their full command lines and related information like memory and CPU consumption.
Christian Göttschebda3ee22021-09-19 13:59:58 +020018Also system wide information, like load average or swap usage, is shown.
Daniel Lange3a1c6982020-09-16 17:54:25 +020019
20The information displayed is configurable through a graphical setup and can be sorted and filtered interactively.
21
22Tasks related to processes (e.g. killing and renicing) can be done without entering their PIDs.
23
Christian Göttschebda3ee22021-09-19 13:59:58 +020024Running `htop` requires `ncurses` libraries, typically named libncurses(w).
Daniel Lange3a1c6982020-09-16 17:54:25 +020025
Christian Göttschebda3ee22021-09-19 13:59:58 +020026`htop` is written in C.
27
28For more information and details visit [htop.dev](https://htop.dev).
Hisham Muhammadd6231ba2006-03-04 18:16:49 +000029
Samuel Williams746a5f22020-09-02 11:54:17 +120030## Build instructions
Hisham Muhammadd6231ba2006-03-04 18:16:49 +000031
Eideen9bba1c62021-07-11 14:10:47 +020032### Prerequisite
33List of build-time dependencies:
Christian Göttschebda3ee22021-09-19 13:59:58 +020034 * standard GNU autotools-based C toolchain
35 - C99 compliant compiler
36 - `autoconf`
37 - `autotools`
38 * `ncurses`
Hisham011bf302016-02-11 17:20:50 -020039
Eideen9bba1c62021-07-11 14:10:47 +020040**Note about `ncurses`:**
Benny Baumann36b7f572021-09-20 16:48:39 +020041> `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:
Eideen9bba1c62021-07-11 14:10:47 +020042>* With Unicode support.
43>* Without Unicode support.
44>
Nathan Scottc9abd782021-07-16 12:47:12 +100045> This is also something that is reflected in the package name on Debian/Ubuntu (via the additional 'w' - 'w'ide character support).
Daniel Lange3a1c6982020-09-16 17:54:25 +020046
Eideen9bba1c62021-07-11 14:10:47 +020047List of additional build-time dependencies (based on feature flags):
48* `sensors`
49* `hwloc`
50* `libcap`
Christian Göttschebda3ee22021-09-19 13:59:58 +020051* `libnl-3`
Hisham011bf302016-02-11 17:20:50 -020052
Christian Göttschebda3ee22021-09-19 13:59:58 +020053Install these and other required packages for C development from your package manager.
Eideen9bba1c62021-07-11 14:10:47 +020054
55**Debian/Ubuntu**
Samuel Williams746a5f22020-09-02 11:54:17 +120056~~~ shell
Christian Göttschebda3ee22021-09-19 13:59:58 +020057sudo apt install libncursesw5-dev autotools-dev autoconf build-essential
Samuel Williams746a5f22020-09-02 11:54:17 +120058~~~
Hisham011bf302016-02-11 17:20:50 -020059
Nathan Scottc9abd782021-07-16 12:47:12 +100060**Fedora/RHEL**
61~~~ shell
Christian Göttschebda3ee22021-09-19 13:59:58 +020062sudo dnf install ncurses-devel automake autoconf gcc
Nathan Scottc9abd782021-07-16 12:47:12 +100063~~~
64
Christian Göttschebda3ee22021-09-19 13:59:58 +020065### Compile from source:
66To compile from source, download from the Git repository (`git clone` or downloads from [GitHub releases](https://github.com/htop-dev/htop/releases/)), then run:
Samuel Williams746a5f22020-09-02 11:54:17 +120067~~~ shell
68./autogen.sh && ./configure && make
69~~~
Hisham Muhammadd6231ba2006-03-04 18:16:49 +000070
Eideen9bba1c62021-07-11 14:10:47 +020071### Install
Nathan Scottc9abd782021-07-16 12:47:12 +100072To 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`.
Eideen9bba1c62021-07-11 14:10:47 +020073
Christian Göttsche5e103ff2021-01-22 19:14:46 +010074### Build Options
75
76`htop` has several build-time options to enable/disable additional features.
77
78#### Generic
79
80 * `--enable-unicode`:
81 enable Unicode support
Christian Göttschebda3ee22021-09-19 13:59:58 +020082 - dependency: *libncursesw*
83 - default: *yes*
Christian Göttsche1fb0c722021-06-13 11:29:39 +020084 * `--enable-affinity`:
85 enable `sched_setaffinity(2)` and `sched_getaffinity(2)` for affinity support; conflicts with hwloc
Christian Göttschebda3ee22021-09-19 13:59:58 +020086 - default: *check*
Christian Göttsche5e103ff2021-01-22 19:14:46 +010087 * `--enable-hwloc`:
Christian Göttsche1fb0c722021-06-13 11:29:39 +020088 enable hwloc support for CPU affinity; disables affinity support
Christian Göttschebda3ee22021-09-19 13:59:58 +020089 - dependency: *libhwloc*
90 - default: *no*
divinity7693378b92021-01-30 13:14:49 +010091 * `--enable-static`:
Christian Göttsche575edff2021-01-22 19:14:59 +010092 build a static htop binary; hwloc and delay accounting are not supported
Christian Göttschebda3ee22021-09-19 13:59:58 +020093 - default: *no*
Christian Göttsche5e103ff2021-01-22 19:14:46 +010094 * `--enable-debug`:
95 Enable asserts and internal sanity checks; implies a performance penalty
Christian Göttschebda3ee22021-09-19 13:59:58 +020096 - default: *no*
97
98#### Performance Co-Pilot
99
100 * `--enable-pcp`:
101 enable Performance Co-Pilot support via a new pcp-htop utility
102 - dependency: *libpcp*
103 - default: *no*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100104
105#### Linux
106
107 * `--enable-sensors`:
108 enable libsensors(3) support for reading temperature data
Christian Göttschebda3ee22021-09-19 13:59:58 +0200109 - dependencies: *libsensors-dev*(build-time), at runtime *libsensors* is loaded via `dlopen(3)` if available
110 - default: *check*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100111 * `--enable-capabilities`:
112 enable Linux capabilities support
Christian Göttschebda3ee22021-09-19 13:59:58 +0200113 - dependency: *libcap*
114 - default: *check*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100115 * `--with-proc`:
116 location of a Linux-compatible proc filesystem
Christian Göttschebda3ee22021-09-19 13:59:58 +0200117 - default: */proc*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100118 * `--enable-openvz`:
119 enable OpenVZ support
Christian Göttschebda3ee22021-09-19 13:59:58 +0200120 - default: *no*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100121 * `--enable-vserver`:
122 enable VServer support
Christian Göttschebda3ee22021-09-19 13:59:58 +0200123 - default: *no*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100124 * `--enable-ancient-vserver`:
125 enable ancient VServer support (implies `--enable-vserver`)
Christian Göttschebda3ee22021-09-19 13:59:58 +0200126 - default: *no*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100127 * `--enable-delayacct`:
128 enable Linux delay accounting support
Christian Göttschebda3ee22021-09-19 13:59:58 +0200129 - dependencies: *pkg-config*(build-time), *libnl-3* and *libnl-genl-3*
130 - default: *check*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100131
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100132
Eideen9bba1c62021-07-11 14:10:47 +0200133## Runtime dependencies:
134`htop` has a set of fixed minimum runtime dependencies, which is kept as minimal as possible:
135* `ncurses` libraries for terminal handling (wide character support).
136
137### Runtime optional dependencies:
138`htop` has a set of fixed optional dependencies, depending on build/configure option used:
Christian Göttschebda3ee22021-09-19 13:59:58 +0200139
140#### Linux
Benny Baumann36b7f572021-09-20 16:48:39 +0200141* `libdl`, if not building a static binary, is always required when support for optional dependencies (i.e. `libsensors`, `libsystemd`) is present.
142* `libcap`, user-space interfaces to POSIX 1003.1e capabilities, is always required when `--enable-capabilities` was used to configure `htop`.
Eideen9bba1c62021-07-11 14:10:47 +0200143* `libsensors`, readout of temperatures and CPU speeds, is optional even when `--enable-sensors` was used to configure `htop`.
Christian Göttschebda3ee22021-09-19 13:59:58 +0200144* `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.
Eideen9bba1c62021-07-11 14:10:47 +0200145
Benny Baumann36b7f572021-09-20 16:48:39 +0200146`htop` checks for the availability of the actual runtime libraries as `htop` runs.
Eideen9bba1c62021-07-11 14:10:47 +0200147
Christian Göttschebda3ee22021-09-19 13:59:58 +0200148#### BSD
149On most BSD systems `kvm` is a requirement to read kernel information.
Eideen9bba1c62021-07-11 14:10:47 +0200150
151More information on required and optional dependencies can be found in [configure.ac](configure.ac).
152
153## Usage
Christian Göttschebda3ee22021-09-19 13:59:58 +0200154See the manual page (`man htop`) or the help menu (**F1** or **h** inside `htop`) for a list of supported key commands.
Daniel Lange3a1c6982020-09-16 17:54:25 +0200155
156## Support
157
Benny Baumann36b7f572021-09-20 16:48:39 +0200158If you have trouble running `htop` please consult your operating system / Linux distribution documentation for getting support and filing bugs.
Daniel Lange3a1c6982020-09-16 17:54:25 +0200159
160## Bugs, development feedback
161
Benny Baumann36b7f572021-09-20 16:48:39 +0200162We have a [development mailing list](https://htop.dev/mailinglist.html). Feel free to subscribe for release announcements or asking questions on the development of `htop`.
Daniel Lange3a1c6982020-09-16 17:54:25 +0200163
Christian Göttschebda3ee22021-09-19 13:59:58 +0200164You can also join our IRC channel [#htop on Libera.Chat](https://web.libera.chat/#htop) and talk to the developers there.
Daniel Lange3a1c6982020-09-16 17:54:25 +0200165
Benny Baumann36b7f572021-09-20 16:48:39 +0200166If you have found an issue within the source of `htop`, please check whether this has already been reported in our [GitHub issue tracker](https://github.com/htop-dev/htop/issues).
Christian Göttschebda3ee22021-09-19 13:59:58 +0200167If 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.
Daniel Lange3a1c6982020-09-16 17:54:25 +0200168
169## History
170
Christian Göttschebda3ee22021-09-19 13:59:58 +0200171`htop` was invented, developed and maintained by [Hisham Muhammad](https://hisham.hm/) from 2004 to 2019. His [legacy repository](https://github.com/hishamhm/htop/) has been archived to preserve the history.
Daniel Lange3a1c6982020-09-16 17:54:25 +0200172
173In 2020 a [team](https://github.com/orgs/htop-dev/people) took over the development amicably and continues to maintain `htop` collaboratively.
Tomas Bartond408c742016-02-11 14:59:45 +0100174
Tomas Bartond408c742016-02-11 14:59:45 +0100175## License
176
Daniel Lange61227792021-09-22 11:28:31 +0200177GNU General Public License, version 2 (GPL-2.0) or, at your option, any later version.