New Projects - Fresh from the Labs
htop aims to be a better version of the long-lived UNIX program, top. Allowing you to browse through your system processes with the keyboard, htop is a much more intuitive way of doing things than the traditional and archaic UNIX way. The htop Web site gives the best summary with this comparison of htop and top:
In htop, you can scroll the list vertically and horizontally to see all processes and complete command lines.
In top, you are subject to a delay for each unassigned key you press (especially annoying when multikey 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; in top, you do.
In htop, you don't need to type the process number or the priority value to renice a process; in top, you do.
htop supports mouse operation; top doesn't.
top is older, hence, more used and tested.
If you're chasing binaries, packages are provided in either native or third-party form for GoboLinux, Debian, Fedora, Red Hat, Slackware, Gentoo, ALT Linux, OpenSUSE, Mandriva, KateOS and Zenwalk. For those going with source, head to the Downloads/SVN page, grab the latest tarball and extract it, or SVN the nightly development tree. In terms of requirements for compiling the source, the only oddity I ran into was that I needed to install the development files for ncurses (in my case, libncurses5-dev).
Open a terminal in the new source directory (whether from an extracted tarball or SVN), and enter the usual:
$ ./configure $ make $ sudo make install
Once the compilation finishes, run the program by entering:
Once inside the htop screen, you'll see things arranged in a way that will make instant sense to those used to some Linux mainstays, such as xosview, Midnight Commander and various system monitors, including, of course, top. At the top of the screen is a selection of handy system information, such as CPU usage, free memory, swap usage and so on. In the center of the screen are all of your system's processes waiting to be browsed, and in classic Norton/Midnight Commander style, the functions of the program are sensibly linked to the function keys of your keyboard, laid out clearly on the bottom of the screen. Take note of that in particular, as you'll be using those functions the most.
To get started, you can browse through your processes with the arrow keys along with Page Up and Page Down. If you want to kill or tinker with a process, press either K or F9. At this point, htop brings up a menu of possible signals to send the program, with SIGTERM being the default choice. Scroll through these if you want to play with more-advanced features, but for most users, just pressing F9 and Enter will do the job fine.
You can kill multiple jobs by pressing the spacebar on each one. The Search function is mapped to F3, allowing you to search for any part of text in the name of the process you're chasing, which comes in handy particularly for overburdened systems with too many processes. The SortBy function, mapped to F6, also is of great help, especially when you want to sort between system- and user-owned processes. And, the Tree function, mapped to F5, is fantastic for seeking things like tricky child processes. This program is fairly loaded with features, so it's worth checking the htop man page and the help screen (assigned to F1) for more information.
Ultimately, htop is a good evolutionary step from unintuitive, older programs like top, and with any luck, it will be included by default with most distros in the years to come. Although the interface still might be a little intimidating for novices, intermediate or advanced users should come to grips with it easily (and let's face it, they're the ones who'll be using it anyway).
John Knight is the New Projects columnist for Linux Journal.
|Nativ Disc||Sep 23, 2016|
|Android Browser Security--What You Haven't Been Told||Sep 22, 2016|
|The Many Paths to a Solution||Sep 21, 2016|
|Synopsys' Coverity||Sep 20, 2016|
|Naztech's Roadstar 5 Car Charger||Sep 16, 2016|
|RPi-Powered pi-topCEED Makes the Case as a Low-Cost Modular Learning Desktop||Sep 15, 2016|
- Android Browser Security--What You Haven't Been Told
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Nativ Disc
- The Many Paths to a Solution
- Naztech's Roadstar 5 Car Charger
- Synopsys' Coverity
- Securing the Programmer
- RPi-Powered pi-topCEED Makes the Case as a Low-Cost Modular Learning Desktop
- Identity: Our Last Stand
- Glass Padding
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide