blob: 7ace7cd181a00eb521cd8e170814ac54a4555260 [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)
Christian Göttsche466d6f92021-09-24 20:28:26 +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`
Benny Baumannb0e5dc12022-09-25 19:40:50 +020037 - `automake`
Christian Göttschebda3ee22021-09-19 13:59:58 +020038 - `autotools`
39 * `ncurses`
Hisham011bf302016-02-11 17:20:50 -020040
Eideen9bba1c62021-07-11 14:10:47 +020041**Note about `ncurses`:**
Benny Baumann36b7f572021-09-20 16:48:39 +020042> `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 +020043>* With Unicode support.
44>* Without Unicode support.
45>
Nathan Scottc9abd782021-07-16 12:47:12 +100046> 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 +020047
Eideen9bba1c62021-07-11 14:10:47 +020048List of additional build-time dependencies (based on feature flags):
49* `sensors`
50* `hwloc`
Daniel Lange3d99c302021-09-22 12:02:10 +020051* `libcap` (v2.21 or later)
Christian Göttschebda3ee22021-09-19 13:59:58 +020052* `libnl-3`
Hisham011bf302016-02-11 17:20:50 -020053
Christian Göttschebda3ee22021-09-19 13:59:58 +020054Install these and other required packages for C development from your package manager.
Eideen9bba1c62021-07-11 14:10:47 +020055
56**Debian/Ubuntu**
Samuel Williams746a5f22020-09-02 11:54:17 +120057~~~ shell
Benny Baumannb0e5dc12022-09-25 19:40:50 +020058sudo apt install libncursesw5-dev autotools-dev autoconf automake build-essential
Samuel Williams746a5f22020-09-02 11:54:17 +120059~~~
Hisham011bf302016-02-11 17:20:50 -020060
Nathan Scottc9abd782021-07-16 12:47:12 +100061**Fedora/RHEL**
62~~~ shell
Christian Göttschebda3ee22021-09-19 13:59:58 +020063sudo dnf install ncurses-devel automake autoconf gcc
Nathan Scottc9abd782021-07-16 12:47:12 +100064~~~
65
HeshamTBa2ca7582022-03-24 11:05:04 +030066**Archlinux/Manjaro**
67~~~ shell
68sudo pacman -S ncurses automake autoconf gcc
69~~~
70
ahsmhaafc4a9d2022-04-14 23:14:42 +053071**macOS**
72~~~ shell
73brew install ncurses automake autoconf gcc
74~~~
75
Christian Göttschebda3ee22021-09-19 13:59:58 +020076### Compile from source:
77To 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 +120078~~~ shell
79./autogen.sh && ./configure && make
80~~~
Hisham Muhammadd6231ba2006-03-04 18:16:49 +000081
Eideen9bba1c62021-07-11 14:10:47 +020082### Install
Nathan Scottc9abd782021-07-16 12:47:12 +100083To 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 +020084
Christian Göttsche5e103ff2021-01-22 19:14:46 +010085### 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öttschebda3ee22021-09-19 13:59:58 +020093 - dependency: *libncursesw*
94 - default: *yes*
Christian Göttsche1fb0c722021-06-13 11:29:39 +020095 * `--enable-affinity`:
96 enable `sched_setaffinity(2)` and `sched_getaffinity(2)` for affinity support; conflicts with hwloc
Christian Göttschebda3ee22021-09-19 13:59:58 +020097 - default: *check*
Christian Göttsche5e103ff2021-01-22 19:14:46 +010098 * `--enable-hwloc`:
Christian Göttsche1fb0c722021-06-13 11:29:39 +020099 enable hwloc support for CPU affinity; disables affinity support
Christian Göttschebda3ee22021-09-19 13:59:58 +0200100 - dependency: *libhwloc*
101 - default: *no*
divinity7693378b92021-01-30 13:14:49 +0100102 * `--enable-static`:
Christian Göttsche575edff2021-01-22 19:14:59 +0100103 build a static htop binary; hwloc and delay accounting are not supported
Christian Göttschebda3ee22021-09-19 13:59:58 +0200104 - default: *no*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100105 * `--enable-debug`:
106 Enable asserts and internal sanity checks; implies a performance penalty
Christian Göttschebda3ee22021-09-19 13:59:58 +0200107 - 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öttsche5e103ff2021-01-22 19:14:46 +0100115
116#### Linux
117
118 * `--enable-sensors`:
119 enable libsensors(3) support for reading temperature data
Christian Göttschebda3ee22021-09-19 13:59:58 +0200120 - dependencies: *libsensors-dev*(build-time), at runtime *libsensors* is loaded via `dlopen(3)` if available
121 - default: *check*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100122 * `--enable-capabilities`:
123 enable Linux capabilities support
Christian Göttschebda3ee22021-09-19 13:59:58 +0200124 - dependency: *libcap*
125 - default: *check*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100126 * `--with-proc`:
127 location of a Linux-compatible proc filesystem
Christian Göttschebda3ee22021-09-19 13:59:58 +0200128 - default: */proc*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100129 * `--enable-openvz`:
130 enable OpenVZ support
Christian Göttschebda3ee22021-09-19 13:59:58 +0200131 - default: *no*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100132 * `--enable-vserver`:
133 enable VServer support
Christian Göttschebda3ee22021-09-19 13:59:58 +0200134 - default: *no*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100135 * `--enable-ancient-vserver`:
136 enable ancient VServer support (implies `--enable-vserver`)
Christian Göttschebda3ee22021-09-19 13:59:58 +0200137 - default: *no*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100138 * `--enable-delayacct`:
139 enable Linux delay accounting support
Christian Göttschebda3ee22021-09-19 13:59:58 +0200140 - dependencies: *pkg-config*(build-time), *libnl-3* and *libnl-genl-3*
141 - default: *check*
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100142
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100143
Eideen9bba1c62021-07-11 14:10:47 +0200144## 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öttschebda3ee22021-09-19 13:59:58 +0200150
151#### Linux
Benny Baumann36b7f572021-09-20 16:48:39 +0200152* `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`.
Eideen9bba1c62021-07-11 14:10:47 +0200154* `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 +0200155* `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 +0200156
Benny Baumann36b7f572021-09-20 16:48:39 +0200157`htop` checks for the availability of the actual runtime libraries as `htop` runs.
Eideen9bba1c62021-07-11 14:10:47 +0200158
Christian Göttschebda3ee22021-09-19 13:59:58 +0200159#### BSD
160On most BSD systems `kvm` is a requirement to read kernel information.
Eideen9bba1c62021-07-11 14:10:47 +0200161
162More information on required and optional dependencies can be found in [configure.ac](configure.ac).
163
164## Usage
Christian Göttschebda3ee22021-09-19 13:59:58 +0200165See 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 +0200166
167## Support
168
Benny Baumann36b7f572021-09-20 16:48:39 +0200169If 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 +0200170
171## Bugs, development feedback
172
Benny Baumann36b7f572021-09-20 16:48:39 +0200173We 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 +0200174
Christian Göttschebda3ee22021-09-19 13:59:58 +0200175You 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 +0200176
Benny Baumann36b7f572021-09-20 16:48:39 +0200177If 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 +0200178If 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 +0200179
180## History
181
Christian Göttschebda3ee22021-09-19 13:59:58 +0200182`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 +0200183
184In 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 +0100185
Tomas Bartond408c742016-02-11 14:59:45 +0100186## License
187
Daniel Lange61227792021-09-22 11:28:31 +0200188GNU General Public License, version 2 (GPL-2.0) or, at your option, any later version.