10 Useful Sar (Sysstat) Examples for UNIX / Linux Performance Monitoring

10 Useful Sar (Sysstat) Examples for UNIX / Linux Performance Monitoring

by Ramesh Natarajan on March 29, 2011

Using sar you can monitor performance of various Linux subsystems (CPU, Memory, I/O..) in real time.

Using sar, you can also collect all performance data on an on-going basis, store them, and do historical analysis to identify bottlenecks.

Sar is part of the sysstat package.

This article explains how to install and configure sysstat package (which contains sar utility) and explains how to monitor the following Linux performance statistics using sar.

  1. Collective CPU usage
  2. Individual CPU statistics
  3. Memory used and available
  4. Swap space used and available
  5. Overall I/O activities of the system
  6. Individual device I/O activities
  7. Context switch statistics
  8. Run queue and load average data
  9. Network statistics
  10. Report sar data from a specific time

This is the only guide you’ll need for sar utility. So, bookmark this for your future reference.

I. Install and Configure Sysstat

Install Sysstat Package

First, make sure the latest version of sar is available on your system. Install it using any one of the following methods depending on your distribution.

 sudo apt-get install sysstat (or) yum install sysstat (or) rpm -ivh sysstat-10.0.0-1.i586.rpm

Install Sysstat from Source

Download the latest version from sysstat download page.

You can also use wget to download the

 wget http://pagesperso-orange.fr/sebastien.godard/sysstat-10.0.0.tar.bz2

tar xvfj sysstat-10.0.0.tar.bz2

cd sysstat-10.0.0

./configure --enable-install-cron

Note: Make sure to pass the option –enable-install-cron. This does the following automatically for you. If you don’t configure sysstat with this option, you have to do this ugly job yourself manually.

  • Creates /etc/rc.d/init.d/sysstat
  • Creates appropriate links from /etc/rc.d/rc*.d/ directories to /etc/rc.d/init.d/sysstat to start the sysstat automatically during Linux boot process.
  • For example, /etc/rc.d/rc3.d/S01sysstat is linked automatically to /etc/rc.d/init.d/sysstat

After the ./configure, install it as shown below.


make install

Note: This will install sar and other systat utilities under /usr/local/bin

Once installed, verify the sar version using “sar -V”. Version 10 is the current stable version of sysstat.

 $ sar -V sysstat version 10.0.0 (C) Sebastien Godard (sysstat  orange.fr)

Finally, make sure sar works. For example, the following gives the system CPU statistics 3 times (with 1 second interval).

 $ sar 1 3 Linux 2.6.18-194.el5PAE (dev-db)        03/26/2011      _i686_  (8 CPU)

01:27:32 PM       CPU     %user     %nice   %system   %iowait    %steal     %idle 01:27:33 PM       all      0.00      0.00      0.00      0.00      0.00    100.00 01:27:34 PM       all      0.25      0.00      0.25      0.00      0.00     99.50 01:27:35 PM       all      0.75      0.00      0.25      0.00      0.00     99.00 Average:          all      0.33      0.00      0.17      0.00      0.00     99.50

Utilities part of Sysstat

Following are the other sysstat utilities.

  • sar collects and displays ALL system activities statistics.
  • sadc stands for “system activity data collector”. This is the sar backend tool that does the data collection.
  • sa1 stores system activities in binary data file. sa1 depends on sadc for this purpose. sa1 runs from cron.
  • sa2 creates daily summary of the collected statistics. sa2 runs from cron.
  • sadf can generate sar report in CSV, XML, and various other formats. Use this to integrate sar data with other tools.
  • iostat generates CPU, I/O statistics
  • mpstat displays CPU statistics.
  • pidstat reports statistics based on the process id (PID)
  • nfsiostat displays NFS I/O statistics.
  • cifsiostat generates CIFS statistics.

This article focuses on sysstat fundamentals and sar utility.

Rest here: http://www.thegeekstuff.com/2011/03/sar-examples/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheGeekStuff+%28The+Geek+Stuff%29&utm_content=Google+Reader
Enhanced by Zemanta

Results of Fedora 16 Release Name Voting

Fedora 16 is codenamed Verne. Here are other details:

The voting has concluded for the Fedora 16 release name, and the
results are in!  Thank you to the Fedora community members who made
name suggestions and participated in the voting.

The Fedora 16 release name is: Verne

Voting period:  Tuesday 2011-04-05 00:00:00 to Monday 2011-04-11 23:59:59
Number of valid ballots cast:  421

Using the range voting method, each candidate could attain a maximum
of (421*9) = 3789 votes.


Votes :: Name
2204 :: Verne
1662 :: Beefy Miracle
1522 :: Omoto
1241 :: Nepia
1207 :: Bonnet
1157 :: Barona
908 :: Llullaillaco
845 :: Legation
607 :: Mt. Orne

Jared Smith
Fedora Project Leader

Enhanced by Zemanta

The Ultimate Guide to Getting Support on Linux-use empathy to login to IRC….

The Ultimate Guide to Getting Support on Linux
Installing Linux has become effortless to the extent that anyone with a little knowledge of computers can get a Linux machine up and running instantly. However, many of them throw in the towel when faced with even the slightest of glitches. The main reason for this is the belief that Linux doesn’t offer any kind of support.

Other problem users face is that the regular technician who repairs their computer refuses even to touch a machine that’s running Linux. So, if you are one of those users disgruntled after encountering a multitude of problems with a fresh Linux install — don’t panic and read on to know some ways in which you could get support for your Linux installation.

1. Press F1 and RTFM

Yes, press F1 now! Distributions like Ubuntu, Fedora and openSUSE provide excellent documentation for almost all of their default programs. Simply press F1 and a nice little window pops-up to explain different parts of the User interface and common terminologies. Reading the documentation works mainly because many users think they face a glitch when in fact, they’re just unfamiliar with the user interface. Ubuntu users can get their hands on a very well written manual explaining Ubuntu step-by-step for free HERE. Fedora users on the other hand can benefit from a huge collection of common problems and their solutions listed HERE.

2. Forums

If your problem is slightly more severe, then leaving your query in the forums is a nice place to start. Every distribution has its own support forum, a link to which can easily be found on the distribution’s main website. If your query is very general, then you might as well post it on linuxquestions.org, which is one of the most active forums for Linux.

For getting your point through, it is essential to pose your question clearly so that the other person can help you in the best way possible. Also, there is etiquette to be followed when posting questions on forums. This manual will teach you to ask questions the smart way so that you’ll get an effective answer really quick. If you don’t know where to start, here’s a list of some of the most popular Linux forums out there:

* linuxquestions.org
* linuxforums.org
* ubuntuforums.org
* forum.kde.org

3. IRC

What is IRC? In case you’re in need of quick help, then IRC is your best bet. IRC, which stands for Internet Relay Chat, is a form of real time Internet chat that allows instant group communication. These group communications happen in discussion forums called channels. Many developers and users hang out in their favorite channels either helping out other users or discussing software.

Getting Started: In order to get started with IRC, you’ll need an IRC client. If you’re using one of the popular distributions like Ubuntu, Fedora or openSUSE you’ll find an IRC client preinstalled. For example, Ubuntu comes with Empathy instant messenger, which acts as an IM client as well as an IRC client. Other than Empathy, there are a lot of good IRC clients, which you can compare using this list: http://en.wikipedia.org/wiki/List_of_IRC_clients

Because covering all the clients is beyond the scope of this tutorial, we’ve decided to keep this tutorial limited to Empathy. To start using IRC on Empathy, you first need to decide on a nickname. Once you’ve done that, go to Applications > Internet and open Empathy Internet Messaging. Now, if you see your ‘contacts’ list, go to Edit > Accounts (or press F4). Here you’ll see a window where you can manage all your messaging accounts.


Rest here… http://feedproxy.google.com/~r/SimplyJun/~3/CIzRtju5AbI/getting-support-on-linux.html


Enhanced by Zemanta