CPU usage with iostat

Bruno Galindro da Costa bruno.galindro at gmail.com
Fri Nov 26 12:47:06 UTC 2010


Hi,

   Why the first execution of "iostat -c" always displays the same values?

[root at abc ~]# iostat -c
Linux 2.6.9-55.ELsmp (abc)         11/26/2010

avg-cpu:  %user   %nice    %sys %iowait   %idle
           5.62    0.00    3.08    3.30   88.00

[root at abc ~]# iostat -c
Linux 2.6.9-55.ELsmp (abc)         11/26/2010

avg-cpu:  %user   %nice    %sys %iowait   %idle
           5.62    0.00    3.08    3.30   88.00

[root at abc ~]# iostat -c
Linux 2.6.9-55.ELsmp (abc)         11/26/2010

avg-cpu:  %user   %nice    %sys %iowait   %idle
           5.62    0.00    3.08    3.30   88.00

___________________________________________________________________________________
___________________________________________________________________________________

     When I use "iostat -c 1" the next values are modified:

[root at abc ~]# iostat -c 1
Linux 2.6.9-55.ELsmp (abc)         11/26/2010

avg-cpu:  %user   %nice    %sys %iowait   %idle
           5.62    0.00    3.08    3.30   88.00

avg-cpu:  %user   %nice    %sys %iowait   %idle
           2.00    0.00    4.00   23.25   70.75

avg-cpu:  %user   %nice    %sys %iowait   %idle
           0.75    0.00    1.74   24.38   73.13

avg-cpu:  %user   %nice    %sys %iowait   %idle
           0.25    0.00    0.50   24.56   74.69

___________________________________________________________________________________
___________________________________________________________________________________


Reading the man pages os iostat, I could not understand these lines:

*"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."
"The first report contains statistics for the time since system startup
(boot). Each subsequent report contains statistics collected during the
interval since the previous report."*

*Why it can´t build a report with the current usage values at the first
execution?*

-- 
Att.
Bruno Galindro da Costa
bruno.galindro at gmail.com
http://www.thevenusproject.com/
http://www.arthurvinicius.com.br/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20101126/be7d7c03/attachment.html 


More information about the users mailing list