A quick-and-dirty script to list the details of IBM atdd
tape devices:
1
2
3
4
5
6
7
8
#!/usr/bin/ksh
HOST=$(hostname)
ioscan -funNC tape | grep 'rtape' | awk '{ print $1 }' | while read T
do
T_SERIAL=$(scsimgr get_info -D "${T}" | grep -i 'serial' | cut -f2 -d'=' | tr -d '"' | tr -d ' ')
T_DEV=$(scsimgr get_info -D "${T}" | grep 'STATUS' | awk '{ print $6 }')
print "${HOST}:${T_DEV}:${T_SERIAL}"
done
Leave a comment