Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aceqbaceq/0fb32660bf9001fa53c6f288ca5d0b41 to your computer and use it in GitHub Desktop.
Save aceqbaceq/0fb32660bf9001fa53c6f288ca5d0b41 to your computer and use it in GitHub Desktop.
#!/bin/bash
disk=$1
sd=`echo "*sd_state::softstate 0t$disk" | mdb -kw`
es=`echo "$sd::print struct sd_lun un_errstats"| mdb -kw | awk '{print$3}'`
ks=`echo "$es::print kstat_t ks_data" | mdb -kw | awk '{print$3}'`
echo " "
echo "disk=" $disk
echo "$ks::print -a struct sd_errstats sd_serial.value.c" | mdb -kw
echo " "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment