
Date: January 21, 2000
The following AIX commands identify the model and serial number of PCI based RS/6000s
Model Number: uname -M
Serial Number: lsattr -El sys0 -a systemid
These commands can make it easier to inventory remote systems via an rexec command or telnet session.
These commands do not work on older Microchannel based systems. On these systems, you can use the "uname -m" command to generate a code that corresponds to the model (but not serial number). See the documentation for the AIX "uname" command for the code-model number correlation.
The following Korn shell script uses these and other commands to list the configuration of a RS/6000. The output includes the model, serial number (PCI only), number of CPU's, amount of memory, disk space, TCP/IP address and AIX level.
Host/IP Address = dodgers.ibmus2.ibm.com is 9.93.152.173
RS/6000 Model = 7009-C10
Number of CPU's = 1
Memory (KB) = 65536
AIX Level = 4.3.3.0
Number of hdisks = 5
Volume Groups
VG Total(MB) Free USED Disks
datavg 1000 244 756 1
rootvg 1000 60 940 1
externvg 2356 1032 1324 3
#!/usr/bin/ksh
# Bruce Spencer, IBM
# 2/4/99
# Modified 1/20/2000 to add serial number and "uname -M"
# This program identifies the Model, serial number (PCI only), memory, CPU'
# and disk on a RS/6000
# Hardware Codes for MCA based systems
CODE=`uname -m | cut -c9,10 `
case $CODE in
02) MODEL="7015-930";;
10) MODEL="7016-730, 7013-530, 7016-730";;
14) MODEL="7013-540";;
18) MODEL="7013-53H";;
1C) MODEL="7013-550";;
20) MODEL="7015-930";;
2E) MODEL="7015-950";;
30) MODEL="7013-520, 7018-740/741";;
31) MODEL="7012-320";;
34) MODEL="7013-52H";;
35) MODEL="7012-32H";;
37) MODEL="7012-340";;
38) MODEL="7012-350";;
41) MODEL="7011-220";;
42) MODEL="7006-41T/41W";;
43) MODEL="7008-M20";;
46) MODEL="7011-250";;
47) MODEL="7011-230";;
48) MODEL="7009-C10";;
57) MODEL="7012-390, 7030-3BT";;
58) MODEL="7012-380, 7030-3AT";;
59) MODEL="7012-39H, 7030-3CT";;
5C) MODEL="7013-560";;
63) MODEL="7015-970/97B";;
64) MODEL="7015-980/98B";;
66) MODEL="7013-580/58F";;
67) MODEL="7013-570/770/771/R10";;
70) MODEL="7013-590";;
71) MODEL="7013-58H";;
72) MODEL="7013-59H/R12";;
75) MODEL="7012-370/375/37T";;
76) MODEL="7012-360/365/36T";;
77) MODEL="7012-355/55H/55L";;
79) MODEL="7013-590";;
80) MODEL="7015-990";;
82) MODEL="7015-R24";;
89) MODEL="7013-595";;
90) MODEL="7009-C20";;
91) MODEL="7006-42x";;
94) MODEL="7012-397";;
A0) MODEL="7013-J30";;
A1) MODEL="7013-J40";;
A3) MODEL="7015-R30";;
A4) MODEL="7015-R40";;
A6) MODEL="7012-G30";;
A7) MODEL="7012-G40";;
C0) MODEL="7024-E20";;
C4) MODEL="7025-F40";;
4C) MODEL=`uname -M`;; # PCI systems
*) MODEL="Unknown";;
esac
# echo "Hostname = " $(hostname)
echo "Host/IP Address = " $(host $(hostname) )
echo "RS/6000 Model = " $MODEL
SN=$(lsattr -El sys0 -a systemid 2>/dev/null)
if [ $? -eq 0 ]
then
echo "Serial Number = " `echo $SN | awk ' { print $2 }'`
fi
echo "Number of CPU's = " $(lscfg |grep -c "^+ proc")
echo "Memory (KB) = " $(lsattr -El sys0 | awk '/realmem/ {print $2 }')
echo "AIX Level = " $(oslevel)
echo "Number of hdisks = " $(lspv |wc -l)
echo "Volume Groups"
# list volume groups disk avail/used
for i in $(lsvg)
do
lsvg $i
done | awk '
BEGIN { printf("%10s\t%10s\t%10s\t%10s\t%10s\n","VG","Total(MB)","Free","USED","Disks") }
/VOLUME GROUP:/ { printf("%10s\t", $3) }
/TOTAL PP/ { B=index($0,"(") + 1
E=index($0," megaby")
D=E-B
printf("%10s\t", substr($0,B,D) )
}
/FREE PP/ { B=index($0,"(") + 1
E=index($0," megaby")
D=E-B
printf("%10s\t", substr($0,B,D) )
}
/USED PP/ { B=index($0,"(") + 1
E=index($0," megaby")
D=E-B
printf("%10s\t", substr($0,B,D) )
}
/ACTIVE PV/ { printf("%10s\t\n", $3) } '