Just got tired of all lspv/lsvg/lsfs/lsdev nonsense when logging in to a customer system.
So wrote a small script that displays ALL devices config:
#########################################################################################################
ide0 Available 1G-19 ATA/IDE Controller Device
cd0 Available 1G-19-00 IDE DVD-ROM Drive
scraid0 Available 1Z-08 PCI 4-Channel Ultra3 SCSI RAID Adapter
hdisk4 Available 1Z-08-00-0,0 SCSI Disk Array RAID 5, 700067 MB
hdisk5 Available 1Z-08-00-1,0 SCSI Disk Array RAID 5, 840080 MB
scsi0 Available 1S-08 Wide/Ultra-3 SCSI I/O Controller, LVD/SE, 40 MHz
hdisk0 Available 1S-08-00-8,0 16 Bit LVD SCSI Disk Drive, 34715 MB
hdisk1 Available 1S-08-00-9,0 16 Bit LVD SCSI Disk Drive, 70006 MB
hdisk2 Available 1S-08-00-10,0 16 Bit LVD SCSI Disk Drive, 70006 MB
hdisk3 Available 1S-08-00-11,0 16 Bit LVD SCSI Disk Drive, 34715 MB
ses0 Available 1S-08-00-15,0 SCSI Enclosure Services Device
scsi1 Available 1S-09 Wide/Ultra-3 SCSI I/O Controller, LVD/SE, 40 MHz
scsi2 Available 1c-08 Wide/Fast-20 SCSI I/O Controller, Single_Ended, 20 MHz
#########################################################################################################
The script is below.
#!/bin/ksh
# Written on 1/7/05
# Updated May 31, 2005
# Version 1.12
# The script displays all scsi and ide devices hirarchy
echo "##########################################################################################################"
if lsdev -Cspci|grep sisscsia >/dev/null ;then
ULTRA3=YES #sisscsia ULTRA3 adapter is present
fi
for DEVICE in `lsdev -Cspci | grep -E "scsi|scraid|ide"|awk '{print $1}'` ;do
NOMORE=1 #display lsattr params on scsi boards
device=`lsdev -Cspci | grep $DEVICE` #check for first level devices
if [[ ${DEVICE%[0-9]*} = "scsi" ]] ;then #Check if it's a board or a bus
if [[ $ULTRA3 = YES ]] ;then
printf -- "\t"
fi
SPEED=`lsattr -El $DEVICE | grep -E "max" | awk '{print $2}'`
TYPE=`lsattr -El $DEVICE | awk '/bus_type/ {print $2}'`
printf "%-79s %-13s %-6s %-4s\n" "$device," "$TYPE," "$SPEED" "MHz"
NOMORE=0 #do not display lsattr params on scsi devices on lower levels
elif [[ ${DEVICE%[0-9]*} != "sisscsia" ]] && [[ $ULTRA3 = YES ]] ;then
printf "\t%-70s\n" "$device"
else
printf "%-70s\n" "$device"
fi
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.