Set of scripts used for various projects.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
719 B

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