dcsimg

Tools for Storage Monitoring: iostat

The world of Linux storage tools for both monitoring and management just stinks. But that doesn't mean that there is absolutely nothing to help with monitoring. One such tool, iostat, can be used to watch what your storage devices are up to.

Introductory Rant

The complete lack of good tools for managing and monitoring storage has been one of my pet peeves for some time. A recent article by Henry Newman made my simmering pot of disdain come to a complete boil. As Henry eloquently points out the network world has standards allowing the development of tools that everyone can use for monitoring and managing their networks. However, as he also points out, nothing like this exists in the storage world. Consequently, we are left with minimal tools for storage administrators to use to understand what is really happening with their storage. Moreover, given today’s world of Storage Area Networks (SANs), NFS, CIFS, iSCSI, and other network storage devices and file systems, one would think that storage tools would be integrated with network tools to provide an integrated view of what is happening with the storage solution.

However, the exact opposite is true. We have no real storage tools, just a hodge-podge of utilities that “sort-of” help us. Perhaps even worse, there is no standardization between them so a tool developed for one platform or one piece of hardware, or one file system, is usually worthless elsewhere.

We, the unwashed masses, that must deal with storage on a daily basis, and this includes home users which encompasses even those who do nothing but read Facebook and check some email, have had to suffer because of the lack of good tools, the lack of people who understand who to configure systems even for home users, and the general lack of focus on storage. As I mentioned in previous articles, the amount of storage is growing at a rate that is difficult to comprehend. This growth varies from my friend’s daughter who now has over 20,000 pictures on her laptop and in Facebook, and continues on to the gene sequencing researchers who are cranking out TB’s every week for every sequence instrument with some institutions having a very large number of sequencing instruments. Does anyone else smell a problem?

Pointing out the problem, while extremely important, is just part of actually solving it. At some point the problem needs to be tackled, wrestled, and otherwise beaten into submission. What I want to do as part of this “solution” process is to discuss existing tools that can help with storage management/monitoring. This article is the first in what is likely to be a series of articles on current storage tools for Linux. This article focuses on iostat.

iostat

IOstat is a console (text based) application that allows you to check the CPU usage as well as the device or partition performance. (Previous IOstat coverage can be found here: Quick and Dirty MySQL Performance Troubleshooting and Making Sense of System Performance.) The iostat man page says the following about iostat:

iostat - Report Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions.

IOstat is part of a bigger package of performance monitoring tools called sysstat that has tools such as,

As you can tell from the links, Sebastien Godard is the maintainer of the sysstats package. You should be able to find it for your distribution but if not, you can get it from the sysstat main page and build it yourself.

Using iostat is very simple and is much like vmstat or other “stat” tools for Linux. The basic command has a few options followed by the device you want to monitor, followed by two numbers. These two are numbers are (1) the time internal between output from iostat, and (2) the number of times iostat is to be run. If you leave the second number blank, iostat will continue indefinitely or until you hit ^c to stop it.

Here is a simple example of using iostat.

[laytonj@home8 ~]$ iostat -x -m /dev/md0 1 5
Linux 2.6.18-194.el5 (home8)    11/13/2010

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
         30.67    1.91    6.49    1.08    0.00   59.84

Device:         rrqm/s   wrqm/s   r/s   w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await  svctm  %util
md0               0.00     0.00  1.89  6.03     0.02     0.02    11.23     0.00    0.00   0.00   0.00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          7.00    0.00    2.00    0.00    0.00   91.00

Device:         rrqm/s   wrqm/s   r/s   w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await  svctm  %util
md0               0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          7.00    0.00    2.00    0.00    0.00   91.00

Device:         rrqm/s   wrqm/s   r/s   w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await  svctm  %util
md0               0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          7.00    0.00    4.00    0.00    0.00   89.00

Device:         rrqm/s   wrqm/s   r/s   w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await  svctm  %util
md0               0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
         12.00    0.00    5.00    0.00    0.00   83.00

Device:         rrqm/s   wrqm/s   r/s   w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await  svctm  %util
md0               0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

In this simple example I used the following options:

  • I used the extended output option (“-x”)
  • I chose to have the output appear in megabytes (“-m”)
  • I chose to have iostat report the statistics for the device, /dev/md0
  • report the values in 1 second intervals and do that 5 times.

Let’s go over the output to understand what iostat is doing.

Comments on "Tools for Storage Monitoring: iostat"

Wow! In the end I got a web site from where I
can genuinely get helpful facts concerning my study
and knowledge.

Feel free to visit my web blog discount mug coupon code

I simply want to say I am just new to blogging and seriously liked you’re blog. More than likely I’m going to bookmark your website . You surely come with excellent well written articles. Appreciate it for sharing your webpage.

Hello, i think that i saw you visited my blog so i came to “return the favor”.I am trying to find things to improve
my website!I suppose its ok to use some of your ideas!!

Below you will locate the link to some internet sites that we consider you should visit.

We came across a cool web site that you simply could possibly enjoy. Take a search in the event you want.

Here is a great Weblog You may Find Intriguing that we encourage you to visit.

Check beneath, are some absolutely unrelated sites to ours, nonetheless, they may be most trustworthy sources that we use.

We like to honor several other net internet sites around the internet, even when they aren?t linked to us, by linking to them. Below are some webpages worth checking out.

That may be the end of this write-up. Right here you?ll discover some web pages that we feel you?ll value, just click the hyperlinks.

Please check out the web-sites we comply with, including this one, because it represents our picks from the web.

Check below, are some entirely unrelated internet sites to ours, nonetheless, they are most trustworthy sources that we use.

Very few sites that happen to be detailed beneath, from our point of view are undoubtedly very well worth checking out.

That will be the end of this write-up. Here you will obtain some web sites that we think you?ll appreciate, just click the links.

Check beneath, are some completely unrelated websites to ours, having said that, they may be most trustworthy sources that we use.

Below you?ll obtain the link to some web pages that we feel you should visit.

Very couple of web sites that happen to become comprehensive below, from our point of view are undoubtedly very well really worth checking out.

Greetings! I’ve been following your blog for a while now and finally got
the bravery to go ahead and give you a shout out from Lubbock Texas!
Just wanted to mention keep up the excellent job!

Here are some links to web pages that we link to since we feel they’re worth visiting.

Here is a great Blog You might Come across Intriguing that we encourage you to visit.

Although web-sites we backlink to beneath are considerably not associated to ours, we feel they are basically really worth a go by, so possess a look.

Here are several of the web pages we suggest for our visitors.

Here are some hyperlinks to web pages that we link to mainly because we consider they are worth visiting.

That would be the end of this article. Here you?ll discover some web sites that we feel you?ll appreciate, just click the hyperlinks.

Excellent piece, i did read it two times so sorry for this, i’ve passed it on to my friends, so with any luck they’ll enjoy
it as well.

Check below, are some absolutely unrelated sites to ours, even so, they may be most trustworthy sources that we use.

Please go to the internet sites we stick to, including this 1, because it represents our picks through the web.

We like to honor numerous other net websites on the internet, even when they aren?t linked to us, by linking to them. Below are some webpages worth checking out.

Always a significant fan of linking to bloggers that I enjoy but do not get a great deal of link like from.

The time to read or take a look at the content material or sites we have linked to below.

That may be the finish of this write-up. Right here you will discover some websites that we feel you will appreciate, just click the hyperlinks.

Leave a Reply