| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 1 | # [](https://htop.dev) |
| Tomas Barton | 01edfcf | 2016-02-11 19:17:00 +0100 | [diff] [blame] | 2 | |
| Nathan Scott | a7a5e35 | 2020-08-20 13:16:31 +1000 | [diff] [blame] | 3 | [](https://github.com/htop-dev/htop/actions) |
| Nathan Scott | b5e6952 | 2020-08-27 10:42:40 +1000 | [diff] [blame] | 4 | [](https://scan.coverity.com/projects/21665) |
| Nathan Scott | a7a5e35 | 2020-08-20 13:16:31 +1000 | [diff] [blame] | 5 | [](https://groups.io/g/htop) |
| BenBE | 78793c5 | 2021-06-16 14:54:20 +0200 | [diff] [blame] | 6 | [](https://web.libera.chat/#htop) |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 7 | [](https://github.com/htop-dev/htop/releases/latest) |
| 8 | [](https://repology.org/project/htop/versions) |
| Christian Göttsche | 466d6f9 | 2021-09-24 20:28:26 +0200 | [diff] [blame] | 9 | [](COPYING?raw=true) |
| Hisham Muhammad | 369bef2 | 2014-04-05 19:56:35 -0300 | [diff] [blame] | 10 | |
| Bart Joy | 816734e | 2020-10-01 20:08:49 +1300 | [diff] [blame] | 11 |  |
| 12 | |
| Samuel Williams | 746a5f2 | 2020-09-02 11:54:17 +1200 | [diff] [blame] | 13 | ## Introduction |
| Hisham Muhammad | d6231ba | 2006-03-04 18:16:49 +0000 | [diff] [blame] | 14 | |
| Nathan Scott | a7a5e35 | 2020-08-20 13:16:31 +1000 | [diff] [blame] | 15 | `htop` is a cross-platform interactive process viewer. |
| Hisham Muhammad | d6231ba | 2006-03-04 18:16:49 +0000 | [diff] [blame] | 16 | |
| Daniel Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 17 | `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öttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 18 | Also system wide information, like load average or swap usage, is shown. |
| Daniel Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 19 | |
| 20 | The information displayed is configurable through a graphical setup and can be sorted and filtered interactively. |
| 21 | |
| 22 | Tasks related to processes (e.g. killing and renicing) can be done without entering their PIDs. |
| 23 | |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 24 | Running `htop` requires `ncurses` libraries, typically named libncurses(w). |
| Daniel Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 25 | |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 26 | `htop` is written in C. |
| 27 | |
| 28 | For more information and details visit [htop.dev](https://htop.dev). |
| Hisham Muhammad | d6231ba | 2006-03-04 18:16:49 +0000 | [diff] [blame] | 29 | |
| Samuel Williams | 746a5f2 | 2020-09-02 11:54:17 +1200 | [diff] [blame] | 30 | ## Build instructions |
| Hisham Muhammad | d6231ba | 2006-03-04 18:16:49 +0000 | [diff] [blame] | 31 | |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 32 | ### Prerequisite |
| 33 | List of build-time dependencies: |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 34 | * standard GNU autotools-based C toolchain |
| 35 | - C99 compliant compiler |
| 36 | - `autoconf` |
| Benny Baumann | b0e5dc1 | 2022-09-25 19:40:50 +0200 | [diff] [blame] | 37 | - `automake` |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 38 | - `autotools` |
| 39 | * `ncurses` |
| Hisham | 011bf30 | 2016-02-11 17:20:50 -0200 | [diff] [blame] | 40 | |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 41 | **Note about `ncurses`:** |
| Benny Baumann | 36b7f57 | 2021-09-20 16:48:39 +0200 | [diff] [blame] | 42 | > `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: |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 43 | >* With Unicode support. |
| 44 | >* Without Unicode support. |
| 45 | > |
| Nathan Scott | c9abd78 | 2021-07-16 12:47:12 +1000 | [diff] [blame] | 46 | > This is also something that is reflected in the package name on Debian/Ubuntu (via the additional 'w' - 'w'ide character support). |
| Daniel Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 47 | |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 48 | List of additional build-time dependencies (based on feature flags): |
| 49 | * `sensors` |
| 50 | * `hwloc` |
| Daniel Lange | 3d99c30 | 2021-09-22 12:02:10 +0200 | [diff] [blame] | 51 | * `libcap` (v2.21 or later) |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 52 | * `libnl-3` |
| Hisham | 011bf30 | 2016-02-11 17:20:50 -0200 | [diff] [blame] | 53 | |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 54 | Install these and other required packages for C development from your package manager. |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 55 | |
| 56 | **Debian/Ubuntu** |
| Samuel Williams | 746a5f2 | 2020-09-02 11:54:17 +1200 | [diff] [blame] | 57 | ~~~ shell |
| Benny Baumann | b0e5dc1 | 2022-09-25 19:40:50 +0200 | [diff] [blame] | 58 | sudo apt install libncursesw5-dev autotools-dev autoconf automake build-essential |
| Samuel Williams | 746a5f2 | 2020-09-02 11:54:17 +1200 | [diff] [blame] | 59 | ~~~ |
| Hisham | 011bf30 | 2016-02-11 17:20:50 -0200 | [diff] [blame] | 60 | |
| Nathan Scott | c9abd78 | 2021-07-16 12:47:12 +1000 | [diff] [blame] | 61 | **Fedora/RHEL** |
| 62 | ~~~ shell |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 63 | sudo dnf install ncurses-devel automake autoconf gcc |
| Nathan Scott | c9abd78 | 2021-07-16 12:47:12 +1000 | [diff] [blame] | 64 | ~~~ |
| 65 | |
| HeshamTB | a2ca758 | 2022-03-24 11:05:04 +0300 | [diff] [blame] | 66 | **Archlinux/Manjaro** |
| 67 | ~~~ shell |
| 68 | sudo pacman -S ncurses automake autoconf gcc |
| 69 | ~~~ |
| 70 | |
| ahsmha | afc4a9d | 2022-04-14 23:14:42 +0530 | [diff] [blame] | 71 | **macOS** |
| 72 | ~~~ shell |
| 73 | brew install ncurses automake autoconf gcc |
| 74 | ~~~ |
| 75 | |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 76 | ### Compile from source: |
| 77 | To 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 Williams | 746a5f2 | 2020-09-02 11:54:17 +1200 | [diff] [blame] | 78 | ~~~ shell |
| 79 | ./autogen.sh && ./configure && make |
| 80 | ~~~ |
| Hisham Muhammad | d6231ba | 2006-03-04 18:16:49 +0000 | [diff] [blame] | 81 | |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 82 | ### Install |
| Nathan Scott | c9abd78 | 2021-07-16 12:47:12 +1000 | [diff] [blame] | 83 | 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`. |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 84 | |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 85 | ### Build Options |
| 86 | |
| 87 | `htop` has several build-time options to enable/disable additional features. |
| 88 | |
| 89 | #### Generic |
| 90 | |
| 91 | * `--enable-unicode`: |
| 92 | enable Unicode support |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 93 | - dependency: *libncursesw* |
| 94 | - default: *yes* |
| Christian Göttsche | 1fb0c72 | 2021-06-13 11:29:39 +0200 | [diff] [blame] | 95 | * `--enable-affinity`: |
| 96 | enable `sched_setaffinity(2)` and `sched_getaffinity(2)` for affinity support; conflicts with hwloc |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 97 | - default: *check* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 98 | * `--enable-hwloc`: |
| Christian Göttsche | 1fb0c72 | 2021-06-13 11:29:39 +0200 | [diff] [blame] | 99 | enable hwloc support for CPU affinity; disables affinity support |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 100 | - dependency: *libhwloc* |
| 101 | - default: *no* |
| divinity76 | 93378b9 | 2021-01-30 13:14:49 +0100 | [diff] [blame] | 102 | * `--enable-static`: |
| Christian Göttsche | 575edff | 2021-01-22 19:14:59 +0100 | [diff] [blame] | 103 | build a static htop binary; hwloc and delay accounting are not supported |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 104 | - default: *no* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 105 | * `--enable-debug`: |
| 106 | Enable asserts and internal sanity checks; implies a performance penalty |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 107 | - default: *no* |
| 108 | |
| 109 | #### Performance Co-Pilot |
| 110 | |
| 111 | * `--enable-pcp`: |
| 112 | enable Performance Co-Pilot support via a new pcp-htop utility |
| 113 | - dependency: *libpcp* |
| 114 | - default: *no* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 115 | |
| 116 | #### Linux |
| 117 | |
| 118 | * `--enable-sensors`: |
| 119 | enable libsensors(3) support for reading temperature data |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 120 | - dependencies: *libsensors-dev*(build-time), at runtime *libsensors* is loaded via `dlopen(3)` if available |
| 121 | - default: *check* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 122 | * `--enable-capabilities`: |
| 123 | enable Linux capabilities support |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 124 | - dependency: *libcap* |
| 125 | - default: *check* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 126 | * `--with-proc`: |
| 127 | location of a Linux-compatible proc filesystem |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 128 | - default: */proc* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 129 | * `--enable-openvz`: |
| 130 | enable OpenVZ support |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 131 | - default: *no* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 132 | * `--enable-vserver`: |
| 133 | enable VServer support |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 134 | - default: *no* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 135 | * `--enable-ancient-vserver`: |
| 136 | enable ancient VServer support (implies `--enable-vserver`) |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 137 | - default: *no* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 138 | * `--enable-delayacct`: |
| 139 | enable Linux delay accounting support |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 140 | - dependencies: *pkg-config*(build-time), *libnl-3* and *libnl-genl-3* |
| 141 | - default: *check* |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 142 | |
| Christian Göttsche | 5e103ff | 2021-01-22 19:14:46 +0100 | [diff] [blame] | 143 | |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 144 | ## Runtime dependencies: |
| 145 | `htop` has a set of fixed minimum runtime dependencies, which is kept as minimal as possible: |
| 146 | * `ncurses` libraries for terminal handling (wide character support). |
| 147 | |
| 148 | ### Runtime optional dependencies: |
| 149 | `htop` has a set of fixed optional dependencies, depending on build/configure option used: |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 150 | |
| 151 | #### Linux |
| Benny Baumann | 36b7f57 | 2021-09-20 16:48:39 +0200 | [diff] [blame] | 152 | * `libdl`, if not building a static binary, is always required when support for optional dependencies (i.e. `libsensors`, `libsystemd`) is present. |
| 153 | * `libcap`, user-space interfaces to POSIX 1003.1e capabilities, is always required when `--enable-capabilities` was used to configure `htop`. |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 154 | * `libsensors`, readout of temperatures and CPU speeds, is optional even when `--enable-sensors` was used to configure `htop`. |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 155 | * `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. |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 156 | |
| Benny Baumann | 36b7f57 | 2021-09-20 16:48:39 +0200 | [diff] [blame] | 157 | `htop` checks for the availability of the actual runtime libraries as `htop` runs. |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 158 | |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 159 | #### BSD |
| 160 | On most BSD systems `kvm` is a requirement to read kernel information. |
| Eideen | 9bba1c6 | 2021-07-11 14:10:47 +0200 | [diff] [blame] | 161 | |
| 162 | More information on required and optional dependencies can be found in [configure.ac](configure.ac). |
| 163 | |
| 164 | ## Usage |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 165 | See the manual page (`man htop`) or the help menu (**F1** or **h** inside `htop`) for a list of supported key commands. |
| Daniel Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 166 | |
| 167 | ## Support |
| 168 | |
| Benny Baumann | 36b7f57 | 2021-09-20 16:48:39 +0200 | [diff] [blame] | 169 | If you have trouble running `htop` please consult your operating system / Linux distribution documentation for getting support and filing bugs. |
| Daniel Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 170 | |
| 171 | ## Bugs, development feedback |
| 172 | |
| Benny Baumann | 36b7f57 | 2021-09-20 16:48:39 +0200 | [diff] [blame] | 173 | We 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 Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 174 | |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 175 | You can also join our IRC channel [#htop on Libera.Chat](https://web.libera.chat/#htop) and talk to the developers there. |
| Daniel Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 176 | |
| Benny Baumann | 36b7f57 | 2021-09-20 16:48:39 +0200 | [diff] [blame] | 177 | If 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öttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 178 | 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. |
| Daniel Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 179 | |
| 180 | ## History |
| 181 | |
| Christian Göttsche | bda3ee2 | 2021-09-19 13:59:58 +0200 | [diff] [blame] | 182 | `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 Lange | 3a1c698 | 2020-09-16 17:54:25 +0200 | [diff] [blame] | 183 | |
| 184 | In 2020 a [team](https://github.com/orgs/htop-dev/people) took over the development amicably and continues to maintain `htop` collaboratively. |
| Tomas Barton | d408c74 | 2016-02-11 14:59:45 +0100 | [diff] [blame] | 185 | |
| Tomas Barton | d408c74 | 2016-02-11 14:59:45 +0100 | [diff] [blame] | 186 | ## License |
| 187 | |
| Daniel Lange | 6122779 | 2021-09-22 11:28:31 +0200 | [diff] [blame] | 188 | GNU General Public License, version 2 (GPL-2.0) or, at your option, any later version. |