LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   iostat is not working ?? only shows cpu, no disk stats ? (https://www.linuxquestions.org/questions/linux-newbie-8/iostat-is-not-working-only-shows-cpu-no-disk-stats-705096/)

BigCohunes 02-16-2009 11:50 AM

iostat is not working ?? only shows cpu, no disk stats ?
 
When I run iostat, I don't get any disk stats, the command only returns cpu information. Below is an example.

Shouldn't I see the read and write stats also, or does io stat only give cpu informaton?

thanks!


>iostat -xtc 60 10

Linux 2.4.21-40.ELsmp (BETSV023.BUZZI.US) 02/03/2009

Time: 02:50:48 PM
avg-cpu: %user %nice %sys %iowait %idle
1.98 0.00 1.06 2.33 94.63

Time: 02:51:48 PM
avg-cpu: %user %nice %sys %iowait %idle
0.28 0.00 0.24 0.13 99.35

Time: 02:52:48 PM
avg-cpu: %user %nice %sys %iowait %idle
0.17 0.00 0.15 0.04 99.64

Time: 02:53:48 PM
avg-cpu: %user %nice %sys %iowait %idle
0.35 0.00 0.28 0.11 99.27

Time: 02:54:48 PM
avg-cpu: %user %nice %sys %iowait %idle
0.33 0.00 0.20 0.02 99.45

Time: 02:55:48 PM
avg-cpu: %user %nice %sys %iowait %idle
0.43 0.00 0.21 0.20 99.17

Time: 02:56:48 PM
avg-cpu: %user %nice %sys %iowait %idle
0.29 0.00 0.20 0.15 99.37

Didier Spaier 02-16-2009 12:10 PM

From 'man iostat':
Code:

OPTIONS
-c
 The -c option is exclusive of the -d option and displays only the CPU usage report.

Use it without that option:
Code:

bash-3.1$ iostat
Linux 2.6.27.17-smp (machine)  16.02.2009

avg-cpu:  %user  %nice %system %iowait  %steal  %idle
          6,01    0,00    0,95    0,43    0,00  92,61

Device:            tps  Blk_read/s  Blk_wrtn/s  Blk_read  Blk_wrtn
hda              2,50        30,44        48,16    982277    1553936
hda1              0,99        27,24        15,21    879050    490824
hda2              1,50        3,15        32,95    101806    1063112
hda3              0,00        0,02        0,00        711          0
hda4              0,00        0,02        0,00        542          0

bash-3.1$


BigCohunes 02-17-2009 07:35 AM

Thanks,

I didn't see that in my man page. With Ubuntu all it says is:

OPTIONS
-c Display the CPU utilization report.


And it also does display the results of the disk usage with "-xtc":

mitch@ubuntu1:~$ iostat -xtc
Linux 2.6.27-11-generic (ubuntu1) 02/17/2009 _i686_

Time: 08:29:36 AM
avg-cpu: %user %nice %system %iowait %steal %idle
8.41 0.57 16.93 14.41 0.00 59.69

Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util
sda 16.28 4.07 28.45 2.33 1266.83 51.15 42.83 0.71 23.23 6.99 21.52
sda1 15.84 4.07 28.17 2.33 1262.38 51.15 43.08 0.71 23.42 7.04 21.45
sda2 0.00 0.00 0.01 0.00 0.02 0.00 2.00 0.00 18.67 18.67 0.02
sda5 0.36 0.00 0.20 0.00 3.28 0.00 16.30 0.00 1.06 0.98 0.02



I guess different versions of Linux show things differently.

Thanks!


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