This way the frequency is read from sysfs only once per update cycle instead of every time the UI is redrawn. This also changes the code to read from /proc/cpuinfo instead. This is because reading from scaling_cur_freq stalls for 10ms if the previous read for the file was more than one second ago. [1] Since htop's update cycle is longer than that, it would cause the read of each CPU's scaling_cur_freq file to block the UI for 20ms. This easily led to a noticeable half-second lag on a 20+ CPU machine. /proc/cpuinfo also has a 10ms delay, but this applies for the whole file so the delay does not scale with the number of CPUs. [2] [1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4815d3c56d1e10449a44089a47544d9ba84fad0d [2]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7d5905dc14a87805a59f3c5bf70173aac2bb18f8
htop
by Hisham Muhammad hisham@gobolinux.org (2004 - 2016)
Introduction
This is htop
, an interactive process viewer.
It requires ncurses
. It is developed primarily on Linux,
but we also have code for running under FreeBSD and Mac OS X
(help and testing are wanted for these platforms!)
This software has evolved considerably over the years, and is reasonably complete, but there is always room for improvement.
Comparison between htop
and classic top
- In
htop
you can scroll the list vertically and horizontally to see all processes and full command lines. - In
top
you are subject to a delay for each unassigned key you press (especially annoying when multi-key escape sequences are triggered by accident). htop
starts faster (top
seems to collect data for a while before displaying anything).- In
htop
you don't need to type the process number to kill a process, intop
you do. - In
htop
you don't need to type the process number or the priority value to renice a process, intop
you do. - In
htop
you can kill multiple processes at once. top
is older, hence, more tested.
Compilation instructions
This program is distributed as a standard autotools-based package. See the INSTALL file for detailed instructions.
When compiling from a release tarball, run:
./configure && make
For compiling sources downloaded from the Git repository, run:
./autogen.sh && ./configure && make
By default make install
will install into /usr/local
, for changing
the path use ./configure --prefix=/some/path
.
See the manual page (man htop
) or the on-line help ('F1' or 'h'
inside htop
) for a list of supported key commands.
If not all keys work check your curses configuration.
License
GNU General Public License, version 2 (GPL-2.0)