htop - an interactive process viewer
Go to file
KholkinDmitrii 28dcbd7584 feat: add sensors for Rockchip RK3566 2024-12-20 23:24:38 +01:00
.github CI: Update libsensors-dev package name 2024-12-20 05:09:33 +08:00
darwin Use uint64_t for disk IO accumulated values 2024-12-14 16:57:25 +01:00
docs Document compilation issues and changed config.h inclusion rules 2023-12-26 15:14:19 +01:00
dragonflybsd DiskIOMeter: draw normalized utilization; show utilization above 100% 2024-12-14 16:57:25 +01:00
freebsd Use uint64_t for disk IO accumulated values 2024-12-14 16:57:25 +01:00
generic Use 'fp' name for local 'FILE*' variables. 2024-04-17 11:54:00 +02:00
iwyu Update list of special header mappings for IWYU 2023-12-26 15:14:19 +01:00
linux feat: add sensors for Rockchip RK3566 2024-12-20 23:24:38 +01:00
netbsd DiskIOMeter: draw normalized utilization; show utilization above 100% 2024-12-14 16:57:25 +01:00
openbsd Remove the special handling for the "Command" column and add a warning that its length should be dynamic 2024-12-10 16:35:40 +01:00
pcp DiskIOMeter: draw normalized utilization; show utilization above 100% 2024-12-14 16:57:25 +01:00
scripts Suppress reporting memory leaks originating from libdevstat 2021-10-14 23:25:19 +02:00
solaris Remove the special handling for the "Command" column and add a warning that its length should be dynamic 2024-12-10 16:35:40 +01:00
unsupported Remove the special handling for the "Command" column and add a warning that its length should be dynamic 2024-12-10 16:35:40 +01:00
zfs Explicitly specify supported modes of all meters 2024-05-22 20:55:45 +02:00
.editorconfig Add `trim_trailing_whitespace` to editorconfig 2019-10-31 11:39:57 -05:00
.gitignore Ignore clangd cache 2022-12-26 17:53:46 +01: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 Keep following a process when resuming process updates 2024-09-22 18:30:40 +02:00
Action.h Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
Affinity.c Update includes based on IWYU 2023-12-26 15:14:19 +01:00
Affinity.h Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
AffinityPanel.c Fix code style 2023-12-26 15:14:19 +01:00
AffinityPanel.h Introduce Machine class for host-specific info (split from ProcessList) 2023-05-08 13:06:07 +10:00
AvailableColumnsPanel.c Remove the special handling for the "Command" column and add a warning that its length should be dynamic 2024-12-10 16:35:40 +01:00
AvailableColumnsPanel.h Update includes based on IWYU 2023-12-26 15:14:19 +01:00
AvailableMetersPanel.c Use dynamicMeters not dynamicColumns for populating setup screen 2024-07-18 07:17:26 +02:00
AvailableMetersPanel.h Introduce Machine class for host-specific info (split from ProcessList) 2023-05-08 13:06:07 +10:00
BatteryMeter.c Explicitly specify supported modes of all meters 2024-05-22 20:55:45 +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 Assert "length > 0" for Meter.getUiName functions 2024-08-13 09:29:17 +02:00
CPUMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
CRT.c Add a placeholder text for print_backtrace()... 2024-08-13 09:25:26 +02:00
CRT.h Resolve a problem in F2/Setup update interval adjustments 2024-08-05 10:01:05 +02:00
CategoriesPanel.c Update includes based on IWYU 2023-12-26 15:14:19 +01:00
CategoriesPanel.h Introduce Machine class for host-specific info (split from ProcessList) 2023-05-08 13:06:07 +10:00
ChangeLog Release 3.3.0 2024-01-10 10:54:15 +01:00
ClockMeter.c Restrict time-related meters to textual display (Text+LED mode) 2024-05-22 20:55:45 +02:00
ClockMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
ColorsPanel.c Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
ColorsPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
ColumnsPanel.c Remove the special handling for the "Command" column and add a warning that its length should be dynamic 2024-12-10 16:35:40 +01:00
ColumnsPanel.h Update includes based on IWYU 2023-12-26 15:14:19 +01:00
CommandLine.c Pass Machine pointer to Settings_new instead of internal detail 2024-09-04 09:39:12 +02:00
CommandLine.h Refactor to use a program name pointer instead of PACKAGE macro 2023-04-06 00:19:54 +02:00
CommandScreen.c Merge branch 'style-header-consistency' of https://github.com/BenBE/htop into BenBE-style-header-consistency 2023-10-10 20:45:54 +11:00
CommandScreen.h Add missing copyright/file headers 2023-05-25 08:59:32 +02:00
Compat.c Use 'sb' name for local 'struct stat' buffers 2024-04-17 11:54:00 +02:00
Compat.h Update '__STDC_VERSION__' check with C23 2024-04-22 13:41:26 +02:00
DateMeter.c Restrict time-related meters to textual display (Text+LED mode) 2024-05-22 20:55:45 +02:00
DateMeter.h Update remaining license headers to explicitly say GPLv2+ 2021-09-24 20:28:26 +02:00
DateTimeMeter.c Restrict time-related meters to textual display (Text+LED mode) 2024-05-22 20:55:45 +02:00
DateTimeMeter.h Update remaining license headers to explicitly say GPLv2+ 2021-09-24 20:28:26 +02:00
DiskIOMeter.c DiskIOMeter: draw normalized utilization; show utilization above 100% 2024-12-14 16:57:25 +01:00
DiskIOMeter.h DiskIOMeter: draw normalized utilization; show utilization above 100% 2024-12-14 16:57:25 +01:00
DisplayOptionsPanel.c Resolve a problem in F2/Setup update interval adjustments 2024-08-05 10:01:05 +02:00
DisplayOptionsPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
DynamicColumn.c Update includes based on IWYU 2023-12-26 15:14:19 +01:00
DynamicColumn.h Rename ProcessList to ProcessTable throughout 2023-08-31 14:13:16 +10:00
DynamicMeter.c Improve DynamicMeter_getUiName() string length logic 2024-08-13 09:35:57 +02:00
DynamicMeter.h Add missing copyright/file headers 2023-05-25 08:59:32 +02:00
DynamicScreen.c Update includes based on IWYU 2023-12-26 15:14:19 +01:00
DynamicScreen.h Align parameter names in declarations with definitions 2024-04-08 18:12:39 +02:00
EnvScreen.c Merge branch 'style-header-consistency' of https://github.com/BenBE/htop into BenBE-style-header-consistency 2023-10-10 20:45:54 +11:00
EnvScreen.h Add missing copyright/file headers 2023-05-25 08:59:32 +02:00
FileDescriptorMeter.c Explicitly specify supported modes of all meters 2024-05-22 20:55:45 +02:00
FileDescriptorMeter.h Create new File Descriptor meter 2023-02-19 17:56:50 +01:00
FunctionBar.c Avoid magic numbers for the size of FunctionBar lists 2024-04-18 10:13:33 +02:00
FunctionBar.h Avoid magic numbers for the size of FunctionBar lists 2024-04-18 10:13:33 +02:00
Hashtable.c Use designated initializer more 2024-04-05 19:25:20 +02:00
Hashtable.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Header.c Use struct member to determine size of allocations 2024-04-20 19:36:00 +02:00
Header.h Update includes based on IWYU 2023-12-26 15:14:19 +01:00
HeaderLayout.h Add HeaderLayout format for one single 100%-width column 2024-04-17 09:09:48 +02:00
HeaderOptionsPanel.c Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
HeaderOptionsPanel.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
HostnameMeter.c Restrict supported modes for text-only meters 2024-05-22 20:55:45 +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 Increase Search and Filter max string length to 128 2023-03-29 10:43:58 +02:00
InfoScreen.c Fix code style 2023-12-26 15:14:19 +01:00
InfoScreen.h Add missing copyright/file headers 2023-05-25 08:59:32 +02:00
ListItem.c Introduce screen tabs 2021-12-07 17:04:49 +11:00
ListItem.h Update includes based on IWYU 2023-12-26 15:14:19 +01:00
LoadAverageMeter.c Explicitly specify supported modes of all meters 2024-05-22 20:55:45 +02:00
LoadAverageMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Machine.c Fix regression from storing monotonic time deltas 2024-04-05 19:07:06 +02:00
Machine.h Align parameter names in declarations with definitions 2024-04-08 18:12:39 +02:00
Macros.h Introduce ATTR_RETNONNULL to indicate functions that will never return NULL 2024-07-11 22:15:57 +02:00
MainPanel.c Clicking on column headers needs to also update the sort direction arrow 2024-01-17 10:18:31 +01:00
MainPanel.h Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
Makefile.am build: Move _XOPEN_SOURCE_EXTENDED define to config.h 2024-12-14 15:58:41 +01:00
MemoryMeter.c Explicitly specify supported modes of all meters 2024-05-22 20:55:45 +02:00
MemoryMeter.h Move shared memory next to used memory 2023-10-26 03:14:33 +04:00
MemorySwapMeter.c Explicitly specify supported modes of all meters 2024-05-22 20:55:45 +02:00
MemorySwapMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Meter.c Clamp graph meter values in "double" type 2024-08-01 12:48:44 +02:00
Meter.h Add attributes to Meter class methods (func pointers) 2024-08-13 09:35:57 +02:00
MeterMode.h Introduce supportedModes bit mask for meters 2024-05-22 20:55:45 +02:00
MetersPanel.c Introduce supportedModes bit mask for meters 2024-05-22 20:55:45 +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 Explicitly specify supported modes of all meters 2024-05-22 20:55:45 +02:00
NetworkIOMeter.h Update includes based on IWYU 2023-12-26 15:14:19 +01:00
Object.c Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
Object.h Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
OpenFilesScreen.c Use 'sb' name for local 'struct stat' buffers 2024-04-17 11:54:00 +02:00
OpenFilesScreen.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
OptionItem.c Add includes for config.h as per the discussion in PR #1337 2023-12-26 15:14:19 +01:00
OptionItem.h Add some headers in the Setup -> Display options panel 2022-05-27 19:47:06 +02:00
Panel.c Fix code style 2023-12-26 15:14:19 +01:00
Panel.h Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
Process.c Drop unused function Process_rowSetPriority() 2024-08-15 10:12:52 +02:00
Process.h Drop unused function Process_rowSetPriority() 2024-08-15 10:12:52 +02:00
ProcessLocksScreen.c Introduce Row and Table classes for screens beyond top-processes 2023-08-30 13:11:57 +10:00
ProcessLocksScreen.h Use a 0x{devnum} format for devices in lock screen, like files screen 2023-01-08 18:22:10 +01:00
ProcessTable.c Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
ProcessTable.h Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
ProvideCurses.h build: Add a test for whether curses.h works. 2024-12-14 15:58:41 +01:00
ProvideTerm.h Fix typo in file name comment in Provide*.h 2023-08-31 14:13:28 +10:00
README README: swap regular file and symlink 2024-03-27 21:18:01 +01:00
README.md README: clarification on kernel requirements for I/O 2024-10-07 15:17:18 +02:00
RichString.c Annotate mbstowcs_nonfatal() with restrict 2024-05-11 23:02:09 +02:00
RichString.h RichString: add access function annotations 2024-01-20 11:53:25 +01:00
Row.c Introduce countDigits() function for PID and UID field widths 2024-12-16 01:10:48 +01:00
Row.h Remove duplicate function declaration in Row.h 2024-10-12 13:37:41 +02:00
RowField.h Introduce Row and Table classes for screens beyond top-processes 2023-08-30 13:11:57 +10:00
Scheduling.c Linux: update gathering information regarding threads 2024-04-06 19:42:28 +02:00
Scheduling.h Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
ScreenManager.c Ignore FOCUS_IN and FOCUS_OUT events if these have been activated within xterm 2024-03-14 20:34:47 +01:00
ScreenManager.h Introduce Machine class for host-specific info (split from ProcessList) 2023-05-08 13:06:07 +10:00
ScreenTabsPanel.c Update includes based on IWYU 2023-12-26 15:14:19 +01:00
ScreenTabsPanel.h Update includes based on IWYU 2023-12-26 15:14:19 +01:00
ScreensPanel.c Update includes based on IWYU 2023-12-26 15:14:19 +01:00
ScreensPanel.h Support dynamic screens with 'top-most' entities beyond processes 2023-08-30 13:11:57 +10:00
Settings.c Simplify Settings toFieldName logic relating to dynamic columns 2024-09-04 09:39:12 +02:00
Settings.h Pass Machine pointer to Settings_new instead of internal detail 2024-09-04 09:39:12 +02:00
SignalsPanel.c Add includes for config.h as per the discussion in PR #1337 2023-12-26 15:14:19 +01:00
SignalsPanel.h Relocate include of config.h from header to source modeule 2023-12-26 15:14:19 +01:00
SwapMeter.c Explicitly specify supported modes of all meters 2024-05-22 20:55:45 +02:00
SwapMeter.h {Memory,Swap}Meter: add "compressed memory" metrics 2023-04-23 16:00:17 +02:00
SysArchMeter.c Restrict supported modes for text-only meters 2024-05-22 20:55:45 +02:00
SysArchMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
TESTPLAN Rename ProcessList to ProcessTable throughout 2023-08-31 14:13:16 +10:00
Table.c Hide Table_removeIndex() from extern callers 2024-08-14 17:11:56 +02:00
Table.h Force rebuild of display table after removals 2024-08-14 17:15:29 +02:00
TasksMeter.c Explicitly specify supported modes of all meters 2024-05-22 20:55:45 +02:00
TasksMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
TraceScreen.c Fixed the issue that the process traced by strace ends and causes the CPU to be fully loaded. 2024-09-18 23:44:10 +02:00
TraceScreen.h Fixed the issue that the process traced by strace ends and causes the CPU to be fully loaded. 2024-09-18 23:44:10 +02:00
UptimeMeter.c Restrict time-related meters to textual display (Text+LED mode) 2024-05-22 20:55:45 +02:00
UptimeMeter.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
UsersTable.c Please Clang 15 2022-08-09 20:30:05 +02:00
UsersTable.h Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Vector.c Use designated initializer more 2024-04-05 19:25:20 +02:00
Vector.h ProcessList: fix quadratic process removal when scanning 2022-05-05 09:17:51 +02:00
XUtils.c Introduce countDigits() function for PID and UID field widths 2024-12-16 01:10:48 +01:00
XUtils.h Introduce countDigits() function for PID and UID field widths 2024-12-16 01:10:48 +01:00
autogen.sh autotools: enable warnings and cleanup 2020-09-17 21:45:11 +02:00
check-pcp-style.sh Check attributes color, type, and width for valid values 2024-07-18 08:55:00 +02:00
configure.ac build: Add "ncurses{t,tw}" to possible ncurses names 2024-12-14 15:58:41 +01:00
htop.1.in Remove the special handling for the "Command" column and add a warning that its length should be dynamic 2024-12-10 16:35:40 +01:00
htop.c Refactor to use a program name pointer instead of PACKAGE macro 2023-04-06 00:19:54 +02:00
htop.desktop Add danish translation to htop.desktop 2019-02-19 01:25:52 +01:00
htop.png Optimize images to reduce filesize 2022-08-30 01:30:48 +02:00
htop.svg Update htop logo, provide .svg file as well 2020-12-05 13:46:34 +01:00
pcp-htop.5.in Updates for 2024. Happy New Year! 2024-01-01 02:12:06 +01:00
pcp-htop.c Refactor to use a program name pointer instead of PACKAGE macro 2023-04-06 00:19:54 +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
    • automake
    • 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):

  • pkg-config
  • sensors
  • hwloc
  • libcap (v2.21 or later)
  • libnl-3 and libnl-genl-3

pkg-config is optional but recommended. The configure script of htop might utilize pkg-config to obtain the compiler and linker flags required for a library. Some OS distributions provide pkg-config functionalities through an alternative implementation such as pkgconf. Look for both names in your package manager.

Install these and other required packages for C development from your package manager.

Debian/Ubuntu

sudo apt install libncursesw5-dev autotools-dev autoconf automake 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: libnl-3-dev(build-time) and libnl-genl-3-dev(build-time), at runtime libnl-3 and libnl-genl-3 are loaded via dlopen(3) if available and requested
    • 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.
  • libnl-3 and libnl-genl-3, if htop was configured with --enable-delayacct and delay accounting process fields are active.
  • I/O counters are available when the kernel is compiled with CONFIG_TASK_IO_ACCOUNTING=Y.

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.