Hi,
We currently use the below basic scripts to output details that the business requires for our AIX and Sun servers. I have been asked to produce the same sort of script to be used for our NCR MP-RAS UNIX and OS/2 UNIX servers but am not formilar with these forms of Unix. Would greatly appreciate if anyone can assist me with this.
AIX
#!/bin/ksh
OUT="/tmp/serverinfo_$(hostname).txt"
print "Server Info" > $OUT
print "hostname" > $OUT
hostname >>$OUT
print "\n-----------------------------------------------" >> $OUT
print "ifconfig -a " >> /$OUT
ifconfig -a >>$OUT
print "\n-----------------------------------------------" >> $OUT
print "Number of processors" >> /$OUT
lsdev -Cc processor >>$OUT
print "\n-----------------------------------------------" >> $OUT
print "lslpp -L" >> /$OUT
lslpp -L >>$OUT
Sun
touch /tmp/`uname -n`-swinv.txt
echo Server Info >>/tmp/`uname
echo =========HOSTNAME=========== >>/tmp/`uname -n`-swinv.txt
uname -n >> /tmp/`uname -n`-swinv.txt
echo >> /tmp/`uname -n`-swinv.txt
echo =========IP ADDRESSES=========== >>/tmp/`uname -n`-swinv.txt
ifconfig -a >>/tmp/`uname -n`-swinv.txt
echo >> /tmp/`uname -n`-swinv.txt
echo ===========HW/CPU INFO============== >>/tmp/`uname -n`-swinv.txt
/usr/platform/`uname -i`/sbin/prtdiag >> /tmp/`uname -n`-swinv.txt
echo >> /tmp/`uname -n`-swinv.txt
echo ==============SW INSTALLED================ >>/tmp/`uname -n`-swinv.txt
pkginfo |sed /SUNW/d|awk '{ print "pkginfo -l " $2}'>> /tmp/`uname -n`-swinv.txt