1HTOP(1)                          User Commands                         HTOP(1)
2
3
4

NAME

6       htop - interactive process viewer
7

SYNOPSIS

9       htop [-dCFhpustvH]
10

DESCRIPTION

12       htop is a cross-platform ncurses-based process viewer.
13
14       It  is similar to top, but allows you to scroll vertically and horizon‐
15       tally, and interact using a pointing device (mouse).  You  can  observe
16       all  processes  running  on  the  system, along with their command line
17       arguments, as well as view them in a tree format, select multiple  pro‐
18       cesses and acting on them all at once.
19
20       Tasks  related  to  processes  (killing,  renicing) can be done without
21       entering their PIDs.
22

COMMAND-LINE OPTIONS

24       Mandatory arguments to long options are  mandatory  for  short  options
25       too.
26
27       -d --delay=DELAY
28              Delay  between updates, in tenths of seconds. If the delay value
29              is less than 1 it is increased to 1, i.e. 1/10  second.  If  the
30              delay value is greater than 100, it is decreased to 100, i.e. 10
31              seconds.
32
33       -C --no-color --no-colour
34              Start htop in monochrome mode
35
36       -F --filter=FILTER
37              Filter processes by command
38
39       -h --help
40              Display a help message and exit
41
42       -p --pid=PID,PID...
43              Show only the given PIDs
44
45       -s --sort-key COLUMN
46              Sort by this column (use --sort-key help  for  a  column  list).
47              This  will  force  a list view unless you specify -t at the same
48              time.
49
50       -u --user=USERNAME
51              Show only the processes of a given user
52
53       -U --no-unicode
54              Do not use unicode but ASCII characters for graph meters
55
56       -M --no-mouse
57              Disable support of mouse control
58
59       -V --version
60              Output version information and exit
61
62       -t --tree
63              Show processes in tree view. This can be used to  force  a  tree
64              view when requesting a sort order with -s.
65
66       -H --highlight-changes=DELAY
67              Highlight new and old processes
68

INTERACTIVE COMMANDS

70       The following commands are supported while in htop:
71
72       Up, Alt-k
73            Select  (highlight)  the  previous  process  in  the process list.
74            Scroll the list if necessary.
75
76       Down, Alt-j
77            Select (highlight) the next process in the  process  list.  Scroll
78            the list if necessary.
79
80       Left, Alt-h
81            Scroll the process list left.
82
83       Right, Alt-l
84            Scroll the process list right.
85
86       PgUp, PgDn
87            Scroll the process list up or down one window.
88
89       Home Scroll  to  the  top  of  the  process  list  and select the first
90            process.
91
92       End  Scroll to the bottom of the  process  list  and  select  the  last
93            process.
94
95       Ctrl-A, ^
96            Scroll  left to the beginning of the process entry (i.e. beginning
97            of line).
98
99       Ctrl-E, $
100            Scroll right to the end of the process entry (i.e. end of line).
101
102       Space
103            Tag or untag a process. Commands that can operate on multiple pro‐
104            cesses,  like "kill", will then apply over the list of tagged pro‐
105            cesses, instead of the currently highlighted one.
106
107       c    Tag the current process and its children. Commands that can  oper‐
108            ate  on  multiple processes, like "kill", will then apply over the
109            list of tagged processes, instead  of  the  currently  highlighted
110            one.
111
112       U    Untag  all  processes  (remove  all tags added with the Space or c
113            keys).
114
115       s    Trace process system calls: if strace(1)  is  installed,  pressing
116            this  key  will  attach it to the currently selected process, pre‐
117            senting a live update of system calls issued by the process.
118
119       l    Display open files for a process: if lsof(1) is installed,  press‐
120            ing  this  key will display the list of file descriptors opened by
121            the process.
122
123       w    Display the command line of the selected  process  in  a  separate
124            screen, wrapped onto multiple lines as needed.
125
126       x    Display  the  active file locks of the selected process in a sepa‐
127            rate screen.
128
129       F1, h, ?
130            Go to the help screen
131
132       F2, S
133            Go to the setup screen, where you can configure  the  meters  dis‐
134            played  at  the  top  of  the screen, set various display options,
135            choose among color schemes, and  select  which  columns  are  dis‐
136            played, in which order.
137
138       F3, /
139            Incrementally  search  the command lines of all the displayed pro‐
140            cesses. The currently selected (highlighted) command  will  update
141            as  you type. While in search mode, pressing F3 will cycle through
142            matching occurrences.  Pressing Shift-F3 will cycle backwards.
143
144            Alternatively the search can be started by simply typing the  com‐
145            mand  you are looking for, although for the first character normal
146            key bindings take precedence.
147
148       F4, \
149            Incremental process filtering: type in part of a  process  command
150            line and only processes whose names match will be shown. To cancel
151            filtering, enter the Filter option again and press Esc.
152
153       F5, t
154            Tree view: organize processes by parenthood, and layout the  rela‐
155            tions between them as a tree. Toggling the key will switch between
156            tree and your previously selected sort view. Selecting a sort view
157            will exit tree view.
158
159       F6, <, >
160            Selects a field for sorting, also accessible through < and >.  The
161            current sort field is indicated by a highlight in the header.
162
163       F7, ]
164            Increase the selected process's  priority  (subtract  from  'nice'
165            value).  This can only be done by the superuser.
166
167       F8, [
168            Decrease the selected process's priority (add to 'nice' value)
169
170       F9, k
171            "Kill" process: sends a signal which is selected in a menu, to one
172            or a group of processes. If processes were tagged, sends the  sig‐
173            nal to all tagged processes.  If none is tagged, sends to the cur‐
174            rently selected process.
175
176       F10, q
177            Quit
178
179       I    Invert the sort order: if sort  order  is  increasing,  switch  to
180            decreasing, and vice-versa.
181
182       +, - When in tree view mode, expand or collapse subtree. When a subtree
183            is collapsed a "+" sign shows to the left of the process name.
184
185       a (on multiprocessor machines)
186            Set CPU affinity: mark which CPUs a process is allowed to use.
187
188       u    Show only processes owned by a specified user.
189
190       N    Sort by PID.
191
192       M    Sort by memory usage (top compatibility key).
193
194       P    Sort by processor usage (top compatibility key).
195
196       T    Sort by time (top compatibility key).
197
198       F    "Follow" process: if the sort order causes the currently  selected
199            process  to  move  in  the list, make the selection bar follow it.
200            This is useful for monitoring a process: this way, you can keep  a
201            process  always  visible  on  screen. When a movement key is used,
202            "follow" loses effect.
203
204       K    Hide kernel threads: prevent the threads belonging the  kernel  to
205            be displayed in the process list. (This is a toggle key.)
206
207       H    Hide user threads: on systems that represent them differently than
208            ordinary processes (such as recent NPTL-based systems),  this  can
209            hide  threads  from userspace processes in the process list. (This
210            is a toggle key.)
211
212       p    Show full paths to running programs, where applicable. (This is  a
213            toggle key.)
214
215       Z    Pause/resume process updates.
216
217       m    Merge  exe,  comm and cmdline, where applicable. (This is a toggle
218            key.)
219
220       Ctrl-L
221            Refresh: redraw screen and recalculate values.
222
223       Numbers
224            PID search: type in process ID and the selection highlight will be
225            moved to it.
226

COLUMNS

228       The  following  columns can display data about each process. A value of
229       '-' in all the rows indicates that a column is unsupported on your sys‐
230       tem,  or currently unimplemented in htop.  The names below are the ones
231       used in the "Available Columns" section of the setup screen. If a  dif‐
232       ferent name is shown in htop's main screen, it is shown below in paren‐
233       thesis.
234
235       Command
236            The full command line of the process (i.e. program name and  argu‐
237            ments).  If  the  option  'Merge exe, comm and cmdline in Command'
238            (toggled by the 'm' key) is set, and if readable,  the  executable
239            path (/proc/[pid]/exe) and the command name (/proc/[pid]/comm) are
240            also shown merged with the command line.
241
242       Comm The command name of the process obtained from /proc/[pid]/comm, if
243            readable.
244
245       Exe  The  abbreviated  basename  of  the  executable  of  the  process,
246            obtained from /proc/[pid]/exe, if readable. htop is able  to  read
247            this  file on linux for ALL the processes only if it has the capa‐
248            bility CAP_SYS_PTRACE or root privileges.
249
250       PID  The process ID.
251
252       STATE (S)
253            The state of the process:
254               S for sleeping (idle)
255               R for running
256               D for disk sleep (uninterruptible)
257               Z for zombie (waiting for parent to read its exit status)
258               T for traced or suspended (e.g by SIGTSTP)
259               W for paging
260
261       PPID The parent process ID.
262
263       PGRP The process's group ID.
264
265       SESSION (SID)
266            The process's session ID.
267
268       TTY_NR (TTY)
269            The controlling terminal of the process.
270
271       TPGID
272            The process ID of the foreground process group of the  controlling
273            terminal.
274
275       MINFLT
276            The number of page faults happening in the main memory.
277
278       CMINFLT
279            The  number  of minor faults for the process's waited-for children
280            (see MINFLT above).
281
282       MAJFLT
283            The number of page faults happening out of the main memory.
284
285       CMAJFLT
286            The number of major faults for the process's  waited-for  children
287            (see MAJFLT above).
288
289       UTIME (UTIME+)
290            The  user  CPU  time,  which is the amount of time the process has
291            spent executing on the CPU in user mode (i.e. everything but  sys‐
292            tem calls), measured in clock ticks.
293
294       STIME (STIME+)
295            The  system  CPU  time, which is the amount of time the kernel has
296            spent executing system calls on behalf of the process, measured in
297            clock ticks.
298
299       CUTIME (CUTIME+)
300            The  children's  user  CPU  time,  which is the amount of time the
301            process's waited-for children have spent executing  in  user  mode
302            (see UTIME above).
303
304       CSTIME (CSTIME+)
305            The  children's  system  CPU time, which is the amount of time the
306            kernel has spent executing system  calls  on  behalf  of  all  the
307            process's waited-for children (see STIME above).
308
309       PRIORITY (PRI)
310            The  kernel's  internal priority for the process, usually just its
311            nice value plus twenty. Different for real-time processes.
312
313       NICE (NI)
314            The nice value of a process, from 19 (low priority) to  -20  (high
315            priority).  A  high value means the process is being nice, letting
316            others have a higher relative priority. The  usual  OS  permission
317            restrictions for adjusting priority apply.
318
319       STARTTIME (START)
320            The time the process was started.
321
322       PROCESSOR (CPU)
323            The ID of the CPU the process last executed on.
324
325       M_VIRT (VIRT)
326            The size of the virtual memory of the process.
327
328       M_RESIDENT (RES)
329            The  resident  set size (text + data + stack) of the process (i.e.
330            the size of the process's used physical memory).
331
332       M_SHARE (SHR)
333            The size of the process's shared pages.
334
335       M_TRS (CODE)
336            The text resident set size of the process (i.e. the  size  of  the
337            process's executable instructions).
338
339       M_DRS (DATA)
340            The data resident set size (data + stack) of the process (i.e. the
341            size of anything except the process's executable instructions).
342
343       M_LRS (LIB)
344            The library size of the process.
345
346       M_DT (DIRTY)
347            The size of the dirty pages of the process.
348
349       M_SWAP (SWAP)
350            The size of the process's swapped pages.
351
352       M_PSS (PSS)
353            The proportional set size, same as M_RESIDENT  but  each  page  is
354            divided by the number of processes sharing it.
355
356       M_M_PSSWP (PSSWP)
357            The  proportional  swap  share of this mapping, unlike M_SWAP this
358            does not take into account swapped out page  of  underlying  shmem
359            objects.
360
361       ST_UID (UID)
362            The user ID of the process owner.
363
364       PERCENT_CPU (CPU%)
365            The  percentage  of  the  CPU  time  that the process is currently
366            using.
367
368       PERCENT_MEM (MEM%)
369            The percentage of memory the process is currently using (based  on
370            the process's resident memory size, see M_RESIDENT above).
371
372       USER The  username  of  the  process  owner, or the user ID if the name
373            can't be determined.
374
375       TIME (TIME+)
376            The time, measured in clock ticks that the process  has  spent  in
377            user and system time (see UTIME, STIME above).
378
379       NLWP The number of threads in the process.
380
381       TGID The thread group ID.
382
383       CTID OpenVZ container ID, a.k.a virtual environment ID.
384
385       VPID OpenVZ process ID.
386
387       VXID VServer process ID.
388
389       RCHAR (RD_CHAR)
390            The number of bytes the process has read.
391
392       WCHAR (WR_CHAR)
393            The number of bytes the process has written.
394
395       SYSCR (RD_SYSC)
396            The number of read(2) syscalls for the process.
397
398       SYSCW (WR_SYSC)
399            The number of write(2) syscalls for the process.
400
401       RBYTES (IO_RBYTES)
402            Bytes of read(2) I/O for the process.
403
404       WBYTES (IO_WBYTES)
405            Bytes of write(2) I/O for the process.
406
407       CNCLWB (IO_CANCEL)
408            Bytes of cancelled write(2) I/O.
409
410       IO_READ_RATE (DISK READ)
411            The I/O rate of read(2) in bytes per second, for the process.
412
413       IO_WRITE_RATE (DISK WRITE)
414            The I/O rate of write(2) in bytes per second, for the process.
415
416       IO_RATE (DISK R/W)
417            The I/O rate, IO_READ_RATE + IO_WRITE_RATE (see above).
418
419       CGROUP
420            Which cgroup the process is in.
421
422       OOM  OOM killer score.
423
424       CTXT Incremental sum of voluntary and nonvoluntary context switches.
425
426       IO_PRIORITY (IO)
427            The  I/O  scheduling  class  followed by the priority if the class
428            supports it:
429               R for Realtime
430               B for Best-effort
431               id for Idle
432
433       PERCENT_CPU_DELAY (CPUD%)
434            The percentage of time spent waiting for a CPU  (while  runnable).
435            Requires CAP_NET_ADMIN.
436
437       PERCENT_IO_DELAY (IOD%)
438            The  percentage  of  time spent waiting for the completion of syn‐
439            chronous block I/O. Requires CAP_NET_ADMIN.
440
441       PERCENT_SWAP_DELAY (SWAPD%)
442            The  percentage  of  time  spent  swapping  in   pages.   Requires
443            CAP_NET_ADMIN.
444
445       COMM The  command name for the process. Requires Linux kernel 2.6.33 or
446            newer.
447
448       EXE  The executable file of the process  as  reported  by  the  kernel.
449            Requires CAP_SYS_PTRACE and PTRACE_MODE_READ_FSCRED.
450
451       All other flags
452            Currently unsupported (always displays '-').
453

EXTERNAL LIBRARIES

455       While htop depends on most of the libraries it uses at build time there
456       are two noteworthy exceptions  to  this  rule.  These  exceptions  both
457       relate  to data displayed in meters displayed in the header of htop and
458       were intentionally created as optional  runtime  dependencies  instead.
459       These exceptions are described below:
460
461       libsystemd
462              The  bindings  for  libsystemd  are used in the SystemD meter to
463              determine the number of active services and the  overall  system
464              state.  Looking for the functions to determine these information
465              at runtime allows for builds to  support  these  meters  without
466              forcing  the  package manager to install these libraries on sys‐
467              tems that otherwise don't use systemd.
468
469              Summary: no build time dependency, optional  runtime  dependency
470              on libsystemd via dynamic loading, with systemctl(1) fallback.
471
472       libsensors
473              The  bindings  for  libsensors  are used for the CPU temperature
474              readings in the CPU usage meters if displaying  the  temperature
475              is  enabled  through the setup screen. In order for htop to show
476              these temperatures correctly though, a proper  configuration  of
477              libsensors  through its usual configuration files is assumed and
478              that all CPU cores correspond to temperature  sensors  from  the
479              coretemp  driver  with core 0 corresponding to a sensor labelled
480              "Core 0". The package temperature may be given  as  "Package  id
481              0".  If  missing  it  is  inferred as the maximum value from the
482              available per-core readings.
483
484              Summary: build time dependency on libsensors(3) C header  files,
485              optional  runtime  dependency on libsensors(3) via dynamic load‐
486              ing.
487

CONFIG FILE

489       By default htop reads its configuration  from  the  XDG-compliant  path
490       ~/.config/htop/htoprc.  The configuration file is overwritten by htop's
491       in-program Setup configuration, so it should not be hand-edited.  If no
492       user configuration exists htop tries to read the system-wide configura‐
493       tion from /etc/htoprc and as a last resort,  falls  back  to  its  hard
494       coded defaults.
495
496       You may override the location of the configuration file using the $HTO‐
497       PRC environment variable (so you can have multiple  configurations  for
498       different machines that share the same home directory, for example).
499

MEMORY SIZES

501       Memory sizes in htop are displayed in a human-readable form.  Sizes are
502       printed in powers of 1024. (e.g., 1023M = 1072693248 Bytes)
503
504       The decision to use this convention  was  made  in  order  to  conserve
505       screen space and make memory size representations consistent throughout
506       htop.
507

SEE ALSO

509       proc(5), top(1), free(1), ps(1), uptime(1) and limits.conf(5).
510

AUTHORS

512       htop was originally developed by Hisham Muhammad.  Nowadays it is main‐
513       tained by the community at <htop@groups.io>.
514
515
516
517htop 3.0.5                           2020                              HTOP(1)
Impressum