LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-07-2013, 02:57 PM   #1
winairmvs
Member
 
Registered: Aug 2009
Posts: 42

Rep: Reputation: 16
Output of iostat not updating


I am attempting to monitor some statistics via the command iostat by running it at the command line like so:

Code:
# iostat -c
Linux 2.6.32-279.19.1.el6.x86_64 (host) 	02/07/2013 	_x86_64_	(2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.66    0.00    0.71    0.95    0.00   97.68

# iostat -c
Linux 2.6.32-279.19.1.el6.x86_64 (host) 	02/07/2013 	_x86_64_	(2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.66    0.00    0.71    0.95    0.00   97.68
Each time I do run the command the output does not update, as if it's keeping the first run's stats forever. If however I run it with the built in interval like this:

Code:
#iostat -c 1

Linux 2.6.32-279.19.1.el6.x86_64 (host) 	02/07/2013 	_x86_64_	(2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.66    0.00    0.71    0.95    0.00   97.68

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           3.50    0.00    5.00    0.00    0.00   91.50
The output is updated and I see the stats change. I have scoured the man page for any mention of how it updates it's output to no avail.
 
Old 02-07-2013, 06:39 PM   #2
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Slack14_64_Multilib
Posts: 3,081
Blog Entries: 4

Rep: Reputation: 745Reputation: 745Reputation: 745Reputation: 745Reputation: 745Reputation: 745Reputation: 745
Code:
iostat -c  1 2 /dev/sda1
works here.

the "1" is the delay, and "2" is the repetition.
Every 1 second twice with CPU stats is
Code:
iostat -c  1 2 /dev/sda1
/dev/sda1 is optional, so you'd get all of them.
 
Old 02-07-2013, 06:55 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,003
Blog Entries: 54

Rep: Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757
From 'man iostat': "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."
 
  


Reply

Tags
iostat, iowait, linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mpstat,iostat,dstat does not updating screen output LinuxLover Linux - General 2 08-31-2012 05:34 AM
iostat output donneo Linux - Server 4 08-11-2009 10:58 PM
formatting iostat output suran Linux - General 4 07-14-2009 07:00 AM
Output of iostat bichonfrise74 Linux - Newbie 2 04-25-2009 11:54 AM
mapping mount points to iostat output DotHQ Linux - Enterprise 1 04-18-2007 10:56 AM


All times are GMT -5. The time now is 02:31 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration