5 Performance Tools for Linux


You know how to troubleshoot a performance problem, of course, but you should also regularly look for changes in the metrics that can indicate a problem. You can use these tools to measure the performance impact of a new application to your system.




  1. top: top provides an ongoing look at processor activity in real time. It displays a listing of the most CPU-intensive tasks on the system, and can provide an interactive interface for manipulating processes. It can sort the tasks by CPU usage, memory usage and runtime. can be better configured than the standard top from the procps suite. Most features can either be selected by an interactive command or by specifying the feature in the personal or system-wide configuration file.A better alternative, in my option, of top is htop. htop gives wonderful graphical stats about your system and configuration and process manipulation is much much easier.

    2007-12-07-031712_1280x800_scrot

  2. sar: sar can display performance data for CPU, run queue, disk I/O, paging (swap), memory, CPU interrupts, networking, and more. The most important sar feature is the capability to create a data file. Every Linux system should collect sar data from cron jobs. The sar data file provides a system administrator with historical performance information. This feature is very important, and it separates sar from the other performance tools. If a nightly batch job runs twice as long as normal, you won’t find out until the next morning (unless you get paged). You need the ability to look at performance data from 12 hours ago. The sar data collector provides this ability. Many reporting syntaxes exist, but let’s look at data collection first.2007-12-07-032027_1280x800_scrot
  3. vmstat: vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity. The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case.2007-12-07-033513_1280x800_scrot
  4. iostat: The iostat command is used for monitoring system input/output device loading by observing the time the devices are active in relation to their average transfer rates. The iostat command generates reports that can be used to change system configuration to better balance the input/output load between physical disks.The first report generated by the iostat command provides statistics concerning the time since the system was booted. Each subsequent report covers the time since the previous report. All statistics are reported each time the iostat command is run. The report consists of a CPU header row followed by a row of CPU statistics. On multiprocessor systems, CPU statistics are calculated system-wide as averages among all processors. A device header row is displayed followed by a line of statistics for each device that is configured.

    2007-12-07-032819_1280x800_scrot

  5. free: The free command outputs memory and swap information, much as the top command does. With no options, free shows the information in kilobytes. The free command has a handful of options. The -m switch causes the output to be in megabytes, and the -t switch provides a total line.2007-12-07-032957_1280x800_scrot

Sources: Mostly manpages


  • Craig HughesNo Gravatar

    February 14th, 2008 16:24

    Those tools are all so 1980. Here are a couple more recent tools, which in many situations are more useful:

    atop — a really nice top replacement which also includes disk, network, and paging info in the display. Like top on roids, but like top, requires a mid-to-large chunk of screen real-estate for viewing. Also includes some sar-like options

    dstat — nice, compact, multi-stat tracking tool. In one line you can get CPU, disk, net, interrupts, paging,… stats; and the thing is extensible with new modules via simple python coding.

Trackbacks

  1. Blog bookmarks 05/22/2008 « My Diigo bookmarks
  2. System Activity Report (SAR) « Keep Walking
  3. hr metrics courses

Subscribe without commenting


Leave a Reply

Note: Any comments are permitted only because the site owner is letting you post, and any comments will be removed for any reason at the absolute discretion of the site owner.