We pick the top ten Top tools

4: Mytop

The second database tool is Mytop [11], which is written in Perl and displays information from the two standard MySQL statements SHOW PROCESSLIST and SHOW STATUS at periodic intervals.

Mytop turns out to be very adaptable, listing information like the missing number of SELECT, INSERT, UPDATE, and DELETE statements. A header at the top of the screen shows the efficiency of the key index at a glance, along with the input and output per second.

The best approach is to launch Mytop by entering mytop -u user -p password -h hostname -P port -d database. The parameters can also be stored in a configuration file: If launched without any options, the tool searches for ~/.mytop. Equal signs are used to separate parameters and their names:

user=sspreitzer
host=192.168.0.222
pass=mysecretpassword

With the use of shortcuts, you can change interactive mode. C switches on the fairly new command and statement counter.

Resource killers are identified easily with the workaround E; this tells the tool to discover the MySQL statement behind a selected thread.

H toggles the header line on and off in the display. Pressing Shift+I lets you output a complete status report on the Inno DB back ends, K terminates a thread, and P takes a break. O changes the sorting order and R (for Reset) sends a FLUSH STATUS statement to the server.

Pressing S changes the refresh interval, and T toggles to the thread view. If all of these key presses are too much for you, you might want to refer to the longer list of shortcuts: ?. But that's not all, because Mytop also supports filter options.

To see threads with connections to a specific database, press D. H filters by specific hostname, U locates a specific user, and F resets all filters.

Mytop is a perfect status monitor for individual MySQL databases.

3: PowerTop

Because of the increasing popularity of mobile devices, it comes as no surprise that PowerTop by Lesswatts [12] is attracting a continually growing community. Although the tool will only run on Intel CPUs and recent distributions, it is extremely useful if you need to optimize the hardware and software on your laptop for maximum battery life.

The neatest thing about PowerTop is that it not only identifies the power hogs, it also includes a fact-filled database of known issues and solutions. It even guesses the current power consumption for the more popular mobile processors.

The battle for the last reserves of energy is fascinating. According to success stories on the project homepage, PowerTop can even double your battery life. Because the tool is only available for Intel CPUs and the latest kernel (2.6.22 or newer), it only takes third place despite its gaming feeling and undeniable cult factor.

2: Atop and Htop

The number two spot is taken by two top clones, Atop [13] and Htop [14]. Because both are close to their role model with respect to feature scope and presentation, they share their good ranking. The advantages offered by Atop, and the Atopsar program that comes with the package, include a detailed view of the monitored processes (Figure 8).

Figure 8: The Atop process list is detailed but interactive.

In contrast, Htop convinces with its sensible overview and its ability to let administrators influence processes directly. For example, the software will sort a process list by name or PID with the use of just a couple of shortcuts, and it can assign a different Nice priority level to all Apache processes (Figure 9).

Figure 9: No tool is better than Htop at changing the Nice level for all Apache processes. Admins can press F6 to sort, the space bar to select, and F6 or F7 to modify the priorities of the entries.

Another nice thing is that the controls are self-explanatory: Htop's interface is a mix of Midnight Commander and Top. A menu with the most important functions is available at the bottom of the screen: F6 is for sorting – the administrator can use a kind of drop-down menu to select the column – and F7 reduces and F8 increases a program's Nice priority. Because the user can press the space bar to make multiple selections, priority changes are easier and faster with Htop than with almost any other system tool.

The information that Atop provides is more useful to an advanced administrator wanting to investigate minute details of individual processes.

In the standard view, Atop supplies advanced information on memory usage (M), scheduling (S), and command-line parameters (C) and various details on processes (V).

A specially patched kernel additionally lets you display disk (D) and network usage (N). Thanks to Atopsar, admins can even access the Sysstat data of the past few days or weeks, assuming you launch the Sar daemon on your system.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • System Status Tools

    A system monitor lets you query the system’s current health state. If you are unhappy with the spartan Top tool, try one of these easy alternatives.

  • The sys admin’s daily grind: Sysdig

    In this issue, sys admin columnist and tool veterinarian Charly Kühnast invites Sysdig, the jack-of-all-trades among system diagnostic tools, into his surgery for a quick checkup. The project promises to unite the functionality of lsof, iftop, netstat, tcpdump, and others.

  • Argus

    Argus helps you monitor the flow of data on your network, detect trends, discover worms and viruses, and analyze bandwidth usage.

  • Charly's Column – Go Access

    Just as a craftsman is unlikely to purchase a new angle grinder every month, sys admins are unlikely to change constantly their tried and trusted tools. Columnist Charly Kühnast ditches this conservative philosophy this month, lured by the charms of a new logfile tool.

  • Bpytop

    Linux users have many options for monitoring system resources, but bpytop, a new Python port of bashtop, more than stands out from the crowd.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News