Disk stats in solaris

1k views Asked by At

I am looking for a "cat /proc/diskstats (from linux)" equivalent in solaris OS, to get disk stats such as reads per sec, writes per sec, kb reads per sec, kb writes per sec.

I tried iostat -xnp, but i guess its not giving me the complete information.

when i issues df -k, i could see only entry with partition name as /dev/dsk/* format, that is my CD drive.

Output of df -k:

Filesystem         1024-blocks Used   Available Capacity  Mounted on
/dev/dsk/c1t1d0s2  57632       57632        0   100%    /media/VBOXADDITIONS_5.0.14_105127

So, i am expecting an entry with c1t1d0s2 in iostat -xnp, but i dont see any.

Is iostat -xnp the right command for my problem?

1

There are 1 answers

4
jlliagre On BEST ANSWER

The iostat -xnp command is already providing all the information you requested.

The fact there is no specific line for c1t1d0s2 is due to the fact there is no partition table on the cdrom. Here, c1t1d0s2 is equivalent to the whole device so you get its statistics with iostat -xnp in the line referencing c1t1d0

$ iostat -xnp 5
                    extended device statistics              
    r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b device
    7,6    5,1  329,3   68,6  0,1  0,1   10,0    5,3   4   6 c1t0d0
    0,0    0,2    0,1    0,0  0,0  0,0    0,0    0,0   0   0 c1t0d0s0
    7,6    4,9  329,3   68,6  0,1  0,1   10,2    5,4   4   6 c1t0d0s1
    0,0    0,0    0,0    0,0  0,0  0,0    0,0    0,0   0   0 c1t0d0p0
    0,0    0,0    0,0    0,0  0,0  0,0    0,0    0,0   0   0 c1t0d0p1
    0,0    0,0    0,0    0,0  0,0  0,0    0,0    0,0   0   0 sd0,h
    0,0    0,0    0,0    0,0  0,0  0,0    0,0    0,0   0   0 sd0,i
    1,1    0,0   33,0    0,0  0,0  0,0    0,0    0,7   0   0 c1t1d0

Beware that the first line is showing the average values since last boot so you should ask for two reports and pick the second one to get current statistics (e.g. iostat -xnp 1 2 for a one second sample).