Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The best way to determine....?

Status
Not open for further replies.

MethodMan1972

IS-IT--Management
Mar 11, 2006
15
DE
...the spec of a server. What commands will best produce a list of the server specs, as in number of processors and speed, memory, storage, disk etc...?

Many thanks
 
As for the number of CPU's and their speed the following is quite useful:

pmcycles -m

Regards
Thomas
 
Try
Code:
#Colrept - AIX system reporting

print_usage()
{
        echo "Usage: " $0 " [Short|Long]"
}

#Check parameter

case $1 in
        [L,l][O,o][N,n][G,g])
                # Long version
                CFGFLGS="-vl"
                ;;
        [S,s][H,h][O,o][R,r][T,t])
                # Short Version
                CFGFLGS="-l"
                ;;
        *)
                # Error condition
                print_usage
                exit 1
                ;;
esac

echo "System Information for `uname -n`"
echo "Report run on `date`\n"

echo "Hardware Configuration"
echo "\nModel Name"
PROCTYPE=`lsattr -El sys0 -a modelname | awk '{ print $2 }'`
echo $PROCTYPE
echo "Firmware Revision level"
#lsattr -El sys0 -a fwversion | awk '{print $2}'
case $PROCTYPE in
        IBM,7044-270|IBM,7107-S80)
                lscfg -vp | grep alter | sed 's/\.\{2,\}/,/g' | awk -F, '{print $2 }';;
        IBM,7025-F80)
                lscfg -vp | grep -F .CL | sed 's/\.\{2,\}/,/g' | awk -F, '{print $2 }';;
        IBM,7026-M80)
                lscfg -vp | grep -F .MM | sed 's/\.\{2,\}/,/g' | awk -F, '{print $2 }';;
        IBM,7026-H80)
                lscfg -vp | grep -F .CM | sed 's/\.\{2,\}/,/g' | awk -F, '{print $2 }';;
        *)
                echo "Unable to provide firmware revision level";;
esac
echo "\nProcessor details"
for proc in `lsdev -C | grep Available | grep proc | cut -c1-11`
do
        echo $proc "\c"
        lsattr -El $proc | grep ^type | awk '{print $2}'
done
echo "\nOS level" `oslevel`
OSML=`oslevel -r`
if [ $? -eq 0 ]
then
echo "Maintenance Level " $OSML
else
echo "No maintenance packs installed"
fi
echo "Incomplete known maintenance level fixes"
instfix -i | grep ML | awk '/^    Not/ {print $5}'
echo "\nMemory details"
#lsattr -EHl mem0
echo `bootinfo -r | awk '{print $1/1024}'` "Mb"
echo "\nDevices Installed"
echo "Local Hard Disks"
lscfg ${CFGFLGS} hdisk\*
echo "Connected hard disks"
lscfg ${CFGFLGS} pdisk\*
echo "CD drives"
lscfg ${CFGFLGS} cd\*
echo "Tape Drives"
lscfg ${CFGFLGS} rmt\*
echo "Floppy drives"
lscfg ${CFGFLGS} fd\*
echo "Ethernet Adapters"
lscfg ${CFGFLGS} ent\*
echo "SCSI Controllers"
lscfg ${CFGFLGS} scsi\*
echo "\nHard Disks installed"
#lspv
for disk in `lspv | awk '{print $1}'`
do
        echo $disk `bootinfo -s $disk | awk '{print $1/1024}'` Gb
done

echo "\nNetwork Cards"
for interface in `ifconfig -l`
do
echo $interface `ifconfig $interface | awk 'NR!=1{print $2}'`
done
echo "\nVolume groups configured"
lsvg
echo "\nVolume group details"
for VolGrp in `lsvg`
do
        lsvg $VolGrp
        echo
done
echo "\nHard disks per Volume Group"
for VolGrp in `lsvg`
do
        echo "Disks in $VolGrp"
        lsvg -p $VolGrp | awk 'NR != 1 { print }'
        echo
done
echo "\nFile systems configured"
for VolGrp in `lsvg`
do
        echo "File systems in $VolGrp"
        lsvg -l $VolGrp | awk 'NR != 1 { print }'
        echo
done
echo "\nFile system usage"
#awk 'BEGIN {printf ( "%-20s\t%s\t%s\t%s\n", "File System", "Total Mb", "Free Mb", "Mount Point")}'
df -Ik | grep -v Filesystem | awk 'BEGIN {printf ( "%-20s\t%s\t%s\t%s\n", "File System", "Total Mb", "Free Mb", "Mount Point")}{ printf ("%-20s\t%.2f\t\t%.2f\t%s\n", $1, $2/1024, $4/1024, $6 )}'
I haven't actually run this code in many years - the config of our systems is pretty stable - but it used to provide pretty much what you're looking for. YOu will probably need to play with the firmware revision portion to match your particular hardware.

Ceci n'est pas une signature
Columb Healy
 
As what P5 say lsconf or you can try prtconf as well!

lscfg -v
lsdev -C

Regards,
Khalid
 
Google for cfg2html for a nice html output.

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Hi

if you go to yahoo.com or .co.uk, and serch for cfg2html someone has written code that generates a full system spec report in plain text and html links, i think you will have to join there usergroup...:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top