AIX Tip of the Week: Using uname to Identify RS/6000 Model
Audience: Systems Administrators, Users
Date: February 1999
The output of the uname -m command can be
used to identify the RS/6000 model number. The output is of the format
xxxxxxxxmmxx, where the "mm" is the machine id. The
corresponding model number
can be found in the attached file uname.htm.
The lsconfig shell script, listed below,
uses the uname -m, and other AIX commands, to identify
the model, number of CPU's, memory, disk layout and AIX 4 level.
A listing of the script and example of the output follows:
Example
$ lsconfig
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.2.0
Number of hdisks = 3
Number of pdisks = 0
Active Volume Groups
VG Total(MB) Free USED Disks
externvg 300 24 276 1
datavg 1000 96 904 1
rootvg 1000 256 744 1
Shell Script
The following is a listing of the lsconfig shell script.
#!/usr/bin/ksh
# Bruce Spencer, IBM
# 2/4/99
# This program identifies the CPU type on a RS/6000
# Note: newer RS/6000 models such as the S70 do not have a unique uname
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";;
4C) MODEL="7248-43P";;
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";;
*) MODEL="Unknown";;
esac
echo "Hostname = " $(hostname)
echo "IP Address = " $(host $(hostname) )
echo "RS/6000 Model = " $MODEL
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) } '