LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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, 03: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, 07:39 PM   #2
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,618
Blog Entries: 1

Rep: Reputation: Disabled
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, 07:55 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,679
Blog Entries: 54

Rep: Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955
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."
 
Old 08-31-2014, 01:36 PM   #4
postcd
Member
 
Registered: Oct 2013
Posts: 290

Rep: Reputation: Disabled
Lightbulb

i found all values of the device being updated except "tps"

and top part of iostat:

Quote:
avg-cpu: %user %nice %system %iowait %steal %idle
12.84 0.23 3.53 10.02 0.00 73.39
these stays static, unchanged for days if i remember old values correctly, at least minutes dont change it..
 
Old 09-04-2014, 05:55 AM   #5
solarisguy
Member
 
Registered: Aug 2010
Location: Seattle
Distribution: CentOS, RHEL, Oracle Enterprise Linux, Solaris, BSD
Posts: 64

Rep: Reputation: 15
Try
Code:
iostat xtd 3 500
 
1 members found this post helpful.
  


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 06:34 AM
iostat output donneo Linux - Server 4 08-11-2009 11:58 PM
formatting iostat output suran Linux - General 4 07-14-2009 08:00 AM
Output of iostat bichonfrise74 Linux - Newbie 2 04-25-2009 12:54 PM
mapping mount points to iostat output DotHQ Linux - Enterprise 1 04-18-2007 11:56 AM


All times are GMT -5. The time now is 02:47 AM.

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