Use of prtdiag to give information of sectors,cylinders,track of each disk

Hi All,

i am trying to get sectors,cylinders,track..etc information of all present disks out of solaris machine using prtvtoc command .
Output of ptrvtoc command is as below :

 
bash-3.2# prtvtoc /dev/dsk/c1t0d0s0
* /dev/dsk/c1t0d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*     255 tracks/cylinder
*   16065 sectors/cylinder
*    5220 cylinders
*    5218 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00    2120580  81706590  83827169   /
       1      3    01      16065   2104515   2120579
       2      5    00          0  83827170  83827169
       8      1    01          0     16065     16064

This is manual way of getting this information where i have to manually put name of the disk .

Can someone help me in automatically perform this task for all teh disk present on anu solaris machine.also i want to have only the 'Dimensions' part not rest.

Please susggest

Perhaps something like:

for DISK in /dev/dsk/c1t0d*s0
do
        prtvtoc "$DISK"
done

thanks a lot Corona688.. i have modified the script a bit and got the end result...:slight_smile: