LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-07-2005, 12:07 AM   #1
tobikars
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
Unhappy Monitoring disk activity with vmstat gives strange values. Why?


Hi All,

Does anybody have experience monitoring disk-activity under Linux?

I have been trying to monitor the hard-disk activity on one of our servers, I am using Centos 4.2 with vmstat from procps version 3.2.2

When I use vmstat -d to get the the data, it returns data for the "milliseconds read":


disk- ------------reads------------ ------------writes----------- -----IO------
total merged sectors ms total merged sectors ms cur sec
hda 11851138 93245 438284844 173684652 6626679 12498683 153004821 268565968 0 23250

Using this data, I run a script with Cron that gets the vmstat-output every 5 minutes in the below format:
(format: Date, Timstamp(seconds), ms_read)

Tue Dec 6 17:35:01 CST 2005 1133861701 173695461
Tue Dec 6 17:40:01 CST 2005 1133862001 173695497
Tue Dec 6 17:45:01 CST 2005 1133862301 173695848
Tue Dec 6 17:50:04 CST 2005 1133862604 174056507
Tue Dec 6 17:55:02 CST 2005 1133862902 175167830
Tue Dec 6 18:00:02 CST 2005 1133863202 175894743
Tue Dec 6 18:05:01 CST 2005 1133863501 175896606
Tue Dec 6 18:10:02 CST 2005 1133863802 177400989 *
Tue Dec 6 18:15:05 CST 2005 1133864105 178477129 *
Tue Dec 6 18:20:48 CST 2005 1133864448 179404649
Tue Dec 6 18:25:03 CST 2005 1133864703 179537470
Tue Dec 6 18:30:03 CST 2005 1133865003 180542458

I loaded up the disk with a few cp-commands (during the * marked period).

In this 5 minute-period, vmstat is trying to tell me that it spent 178477129-177400989 = 1,504,383 milliseconds reading, while the timestamp shows around 300 seconds (=300,000 milliseconds).

How is this possible? Is there a bug in vmstat? Am I not reading the right parameter from the vmstat output?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
monitoring user activity buehler Linux - Security 1 09-02-2005 03:46 PM
Really strange change of string values in C realos Programming 34 08-08-2005 09:32 PM
monitoring modem activity on ppp tireseas Linux - Networking 1 02-13-2005 08:27 AM
firewall activity monitoring tool qanopus Linux - Software 1 06-25-2004 04:05 PM
Hard drive activity monitoring bkeating Linux - General 1 05-24-2002 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration