LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Output of iostat not updating (http://www.linuxquestions.org/questions/linux-server-73/output-of-iostat-not-updating-4175449060/)

winairmvs 02-07-2013 02:57 PM

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.

Habitual 02-07-2013 06:39 PM

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.

unSpawn 02-07-2013 06:55 PM

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."

postcd 08-31-2014 12:36 PM

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..

solarisguy 09-04-2014 04:55 AM

Try
Code:

iostat xtd 3 500


All times are GMT -5. The time now is 11:30 PM.