|
- #!/bin/sh -
-
- #echo start
-
- readsize=512
-
- for i in $( zpool list -v ztank | awk '$1 ~ /^label\// { print $1 }' ); do
- barename="${i%.eli}"
- i=/dev/${barename}
- disksizemb=$(diskinfo "$i" | awk '{ print int($3 / 1024 / 1024) }')
- #echo -n $i
- inner=$(dd if="$i" bs=1m count="$readsize" of=/dev/null 2>&1 | awk 'END { print substr($7, 2) / 1024 / 1024 }')
- middle=$(dd if="$i" bs=1m count="$readsize" iseek=$(($disksizemb / 2)) of=/dev/null 2>&1 | awk 'END { print substr($7, 2) / 1024 / 1024 }')
- outer=$(dd if="$i" bs=1m count="$readsize" iseek=$(($disksizemb - "$readsize")) of=/dev/null 2>&1 | awk 'END { print substr($7, 2) / 1024 / 1024 }')
- printf "%s\t%s\t%s\t%s\n" ${barename} $inner $middle $outer
- done
- #echo end
|