Does anyone know any software that I could use to generate a invetory of all my RS6000 . At this time we have 55 servers and it is becoming hard to keep track of them. Or maybe someone has a script they could share that would do it ...
cfg2html is good, but you could also use prtconf & lslpp -al .
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."
Sorry it is so long but it delivers quite a lot of information
#!/usr/bin/ksh
#
PROGNAME="$0"
#
VERSION="beta.3.6"
#
NAME="SYSTEM CONFIGURATION REPORT (sysrep)"
#
# (c) Kelvin Yoxall
# Software
#
# 2002 - 2004
#
# History
# I gave up on the program history details many moons ago, it was getting too long!
#
#
# function Sub_Section_Footer()
#
Sub_Section_Footer()
{
echo "</xmp>" >>$SUBOUTFILE
echo "</pre>\n</p>" >>$SUBOUTFILE
# Added because netscape is interpreting attributes even in pre formatted text
}
echo "\nNumber of configured Users is: `wc -l </etc/passwd`" >>$SUBOUTFILE
echo "\nNumber of configured Groups is: `wc -l </etc/group`" >>$SUBOUTFILE
echo "\nBootlist details (bootlist -r): -" >>$SUBOUTFILE
echo "Note, this can return null or strange values depending upon system type." >>$SUBOUTFILE
for MODE in normal service
do
echo "\nMode: $MODE: -" >>$SUBOUTFILE
bootlist -m $MODE -r >>$SUBOUTFILE
done
if [ -f /image.data ]
then
echo "\nDate of last mksysb from /image.data file is: \c" >>$SUBOUTFILE
ls -l /image.data | awk ' { print $6 " " $7 " " $8 } ' >>$SUBOUTFILE
else
echo "\nWarning - There may not be a mksysb for this system!" >>$SUBOUTFILE
echo " No /image.data file exists." >>$SUBOUTFILE
fi
echo "\nNumber of entries in Error Log is: `errpt | wc -l`" >>$SUBOUTFILE
echo "\nFileset State details: -" >>$SUBOUTFILE
lslpp -Lqc | awk '
BEGIN { FS = ":"
c == 0
a == 0
o == 0
b == 0 }
{ if ( $6 == "C" ) c += 1
if ( $6 == "A" ) a += 1
if ( $6 == "O" ) o += 1
if ( $6 == "B" ) b += 1 }
END { print "\tCommitted:",c
print "\tApplied:",a
print "\tObsolete:",o
print "\tBroken:",b }
' >>$SUBOUTFILE
echo "\nChecking fileset consistency"
lppchk -v >$TMPFILE 2>&1
if [ $? -eq 0 ]
then
echo "\nFileset Consistency (lppchk -v) is OK." >>$SUBOUTFILE
else
echo "WARNING - Filesets are not consistent!" >>$SUBOUTFILE
echo "Please check / correct the following errors: -" >>$SUBOUTFILE
cat $TMPFILE >>$SUBOUTFILE
rm $TMPFILE
fi
TCB=`odmget -q "attribute like 'TCB*'" PdAt | grep deflt | cut -f2 -d\"`
if [ "$TCB" = "tcb_enabled" ]
then
echo "\nTrusted Computing Base(TCB) is ENABLED." >>$SUBOUTFILE
echo "\nResults of a TCB Check follow" >>$SUBOUTFILE
tcbck -n ALL >>$SUBOUTFILE 2>&1
else
echo "\nTrusted Comuting Base(TCB) is DISABLED." >>$SUBOUTFILE
fi
Section_Footer
}
#
# function License_Details
#
License_Details()
{
HEADER="Licensing, LUM and Nodelock Details"
Section_Header
echo ".\c"
echo "License Details: -" >>$SUBOUTFILE
lslicense >>$SUBOUTFILE
echo ".\c"
echo "\nAuthentication method is `lsauthent`." >>$SUBOUTFILE
for GROUP in iforls iforncs
do
echo ".\c"
echo "\nStatus of $GROUP daemons: -" >>$SUBOUTFILE
lssrc -g $GROUP >>$SUBOUTFILE
done
echo ".\c"
if [ -x /usr/lib/netls/bin/ls_targetid ]
then
echo "\nTargit ID details: -" >>$SUBOUTFILE
/usr/lib/netls/bin/ls_targetid >>$SUBOUTFILE 2>/dev/null
else
echo "\nNo ls_targetid command, check that fileset ????? is installed!" >>$SUBOUTFILE
fi
echo ".\c"
for FILE in /var/ifor/nodelock
do
if [ -f $FILE ]
then
echo "\nContents of nodelock file $FILE: -" >>$SUBOUTFILE
cat $FILE >>$SUBOUTFILE
echo "\n " >>$SUBOUTFILE
else
echo "\nnodelock file $FILE does not exist!" >>$SUBOUTFILE
fi
done
Section_Footer
}
#
# function File_Systems
#
File_Systems()
{
HEADER="File System Details"
Section_Header
echo "<ol>" >>$SUBINDFILE
SUBHEADER="Mounted File Systems"
Sub_Section_Header
mount >>$SUBOUTFILE
Sub_Section_Footer
SUBHEADER="NFS mounted file systems"
Sub_Section_Header
lsnfsmnt >>$SUBOUTFILE
Sub_Section_Footer
SUBHEADER="File System space (K)"
Sub_Section_Header
df -vk >>$SUBOUTFILE
Sub_Section_Footer
lsnfsexp >$TMPFILE 2>/dev/null
SUBHEADER="NFS exported file systems"
Sub_Section_Header
if [ -s $TMPFILE ]
then
cat $TMPFILE >>$SUBOUTFILE
else
echo "\nNo NFS exported file systems. " >>$SUBOUTFILE
fi
Sub_Section_Footer
SUBHEADER="Contents of /etc/filesystems"
Sub_Section_Header
cat /etc/filesystems >>$SUBOUTFILE
Sub_Section_Footer
SUBHEADER="Virtual File System Details"
Sub_Section_Header
lsvfs -a >>$SUBOUTFILE
Sub_Section_Footer
echo "</ol>" >>$SUBINDFILE
Section_Footer
}
#
# function HACMP_Details
#
HACMP_Details()
{
if [ "`lslpp -L | grep cluster`" != "" ]
then
HEADER="HACMP Details"
Section_Header
if [ -x /usr/sbin/cluster/utilities/cllsres ]
then
echo "<ol>" >>$SUBINDFILE
for CMND in cllscf "cllsif -c" cllsres clshowres cllsnode clfindres
do
SUBHEADER="$CMND on `uname -n`"
Sub_Section_Header
/usr/sbin/cluster/utilities/$CMND >>$SUBOUTFILE 2>&1
Sub_Section_Footer
done
SUBHEADER="Resource Group details"
Sub_Section_Header
odmget HACMPgroup >>$SUBOUTFILE 2>&1
Sub_Section_Footer
SUBHEADER="Application Server details"
Sub_Section_Header
odmget HACMPserver >>$SUBOUTFILE 2>&1
Sub_Section_Footer
SUBHEADER="HACMP Subsystem details"
Sub_Section_Header
for SUBSYS in grpsvcs grpglsm emsvcs topsvcs
do
echo "</pre></p>\n<h4>Subsystem details for $SUBSYS</h4>\n<p><pre>" >>$SUBOUTFILE
lssrc -ls $SUBSYS >>$SUBOUTFILE 2>&1
done
Sub_Section_Footer
SUBHEADER="Application Server START Script Contents"
Sub_Section_Header
echo "<ol>" >>$SUBINDFILE
odmget HACMPserver >$TMPFILE
for F in `cat $TMPFILE | grep "start =" | awk ' { print $3 }' | sed "s/\"//g" `
do
SUBHEADER="Script File: $F"
Sub_Section_Header
cat $F >>$SUBOUTFILE
Sub_Section_Footer
done
echo "</ol>" >>$SUBINDFILE
Sub_Section_Footer
SUBHEADER="Application Server STOP Script Contents"
Sub_Section_Header
echo "<ol>" >>$SUBINDFILE
odmget HACMPserver >$TMPFILE
for F in `cat $TMPFILE | grep "stop =" | awk ' { print $3 }' | sed "s/\"//g" `
do
SUBHEADER="Script File: $F"
Sub_Section_Header
cat $F >>$SUBOUTFILE
Sub_Section_Footer
done
echo "</ol>" >>$SUBINDFILE
Sub_Section_Footer
else
echo "HACMP commands ignored. cllsres not found." >>$SUBOUTFILE
fi
echo "</ol>" >>$SUBINDFILE
Section_Footer
fi
}
#
# Function EMC_Details
#
EMC_Details()
{
HEADER="EMC Symmetrix Details"
Section_Header
if [ -d /usr/symcli/bin ]
then
TEMPPATH=$PATH
PATH=$PATH:/usr/symcli/bin
fi
if [ -x /usr/sbin/powermt ]
then
COMMAND="/usr/sbin/powermt"
else
COMMAND=`whence powermt`
fi
SUBHEADER="PowerPath"
Sub_Section_Header
if [ "$COMMAND" != "" ]
then
if [ -f /etc/powerpath_registration ]
then
echo "</pre></p><h3>PowerPath Reg File Contents (/etc/powerpath_registration)</h3><p><pre>" >>$SUBOUTFILE
cat /etc/powerpath_registration >>$SUBOUTFILE
echo "\n" >>$SUBOUTFILE
eval $COMMAND check_registration >>$SUBOUTFILE 2>&1
else
echo "\n*** WARNING ***" >>$SUBOUTFILE
echo "PowerPath Reg File: /etc/powerpath_registration NOT FOUND!" >>$SUBOUTFILE
fi
SUBHEADER="DNS Information"
Sub_Section_Header
for FILE in /etc/resolv.conf /etc/netsvc.conf /etc/irs.conf
do
if [ -f $FILE ]
then
echo "</xmp></pre></p><h3>Contents of $FILE file</h3><p><pre><xmp>" >>$SUBOUTFILE
cat $FILE >>$SUBOUTFILE
else
echo "</xmp></pre></p><h3>$FILE not configured</h3><p><pre><xmp>" >>$SUBOUTFILE
fi
done
Sub_Section_Footer
SUBHEADER="Contents of /etc/hosts file"
Sub_Section_Header
cat /etc/hosts >>$SUBOUTFILE
Sub_Section_Footer
SUBHEADER="Trusted Host details"
Sub_Section_Header
for F in /.rhosts /etc/hosts.equiv /etc/hosts.lpd /usr/sbin/cluster/etc/rhosts
do
if [ -f $F ]
then
echo "\n</xmp></pre></p><h3>Contents of $F file</h3><p><pre><xmp>" >>$SUBOUTFILE
cat $F >>$SUBOUTFILE
else
echo "\n</xmp></pre></p><h3>File $F does not exist</h3><p><pre><xmp>" >>$SUBOUTFILE
fi
done
Sub_Section_Footer
SUBHEADER="Network Object Values (no -a)"
Sub_Section_Header
no -a >>$SUBOUTFILE
Sub_Section_Footer
echo "</ol>" >>$SUBINDFILE
Section_Footer
}
#
# function DAS
#
DAS()
{
if [ -f /usr/bin/navicli_getconf ]
then
HEADER="Disk Array Subsystem Details (Navisphere)"
Section_Header
/usr/bin/navicli_getconf -d /tmp/$0.Navisphere >>$TMPFILE 2>$TMPFILE
if [ $? -eq 0 ]
then
for FILE in `ls /tmp/$0.Navisphere`
do
echo ".\c"
echo "\nFile name: $FILE\n" >>$SUBOUTFILE
cat /tmp/$0.Navisphere/$FILE >>$SUBOUTFILE
done
echo ""
else
cat $TMPFILE >>$SUBOUTFILE
fi
Section_Footer
fi
}
#
# function ATF
#
ATF()
{
if [ -f /usr/sbin/atf/atfi ]
then
HEADER="ATF Details"
Section_Header
echo "<ol>" >>$SUBINDFILE
SUBHEADER="ATF Software Details"
SUBHEADER="ATF Object Details"
Sub_Section_Header
echo "<ol>" >>$SUBINDFILE
for i in `lsdev -C | grep atf | awk ' { print $1 } ' `
do
if [ "$i" = "" ]
then
echo "\nThere are no ATF objects!" >>$SUBOUTFILE
else
echo ".\c"
SUBHEADER="ATF object: $i" >>$SUBOUTFILE
Sub_Section_Header
/usr/sbin/atf/atfi -d $i -p >>$SUBOUTFILE
Sub_Section_Footer
fi
done
echo "</ol>" >>$SUBINDFILE
Sub_Section_Footer
echo "</ol>" >>$SUBINDFILE
Section_Footer
fi
}
#
# function SSA_Details
#
SSA_Details()
{
HEADER="SSA Details"
Section_Header
FLAG=n
ADAPTERS=`lsdev -Ccadapter -t ssa`
if [ "$ADAPTERS" = "" ]
then
echo "</pre></p><h3>No SSA adapters found</h3><p><pre>" >>$SUBOUTFILE
else
echo "</pre></p><h3>SSA adapters</h3><p><pre>" >>$SUBOUTFILE
lsdev -Ccadapter -t ssa >>$SUBOUTFILE
FLAG=y
fi
ADAPTERS=`lsdev -C -t ssa160 -c adapter`
if [ "$ADAPTERS" = "" ]
then
echo "</pre></p><h3>No SSA160 adapters found</h3><p><pre>" >>$SUBOUTFILE
else
echo "</pre></p><h3>SSA160 adapters</h3><p><pre>" >>$SUBOUTFILE
lsdev -C -t ssa160 -c adapter >>$SUBOUTFILE
FLAG=y
fi
if [ "$FLAG" = "y" ]
then
echo "<ol>" >>$SUBINDFILE
SUBHEADER="SSA Physical Disks"
Sub_Section_Header
lsdev -C -c pdisk -sssar -H >>$SUBOUTFILE
Sub_Section_Footer
SUBHEADER="SSA Logical Disks"
Sub_Section_Header
lsdev -C -thdisk -cdisk -sssar -H >>$SUBOUTFILE
Sub_Section_Footer
SUBHEADER="SSA Disk Mappings - Physical to Logical" >>$SUBOUTFILE
Sub_Section_Header
for i in `lsdev -CS1 -cpdisk -sssar -F name`
do
echo "$i: `ssaxlate -l $i`" >>$SUBOUTFILE
done
Sub_Section_Footer
SUBHEADER="SSA Disk Mappings - Logical to Physical" >>$SUBOUTFILE
Sub_Section_Header
for i in `lsdev -CS1 -cdisk -sssar -F name`
do
echo "$i: `ssaxlate -l $i`" >>$SUBOUTFILE
done
Sub_Section_Footer
echo "</ol>" >>$SUBINDFILE
fi
Section_Footer
}
#
# function NetBackup
#
NetBackup()
{
if [ -f /usr/openv/netbackup/version ]
then
HEADER="NetBackup S/W Details"
Section_Header
echo ".\c"
echo "NetBackup appears to be installed, Version Info follows:-\n" >>$SUBOUTFILE
cat /usr/openv/netbackup/version >>$SUBOUTFILE
if [ -f /usr/openv/netbackup/bp.conf ]
then
echo ".\c"
echo "Contents of file: bp.conf\n" >>$SUBOUTFILE
cat /usr/openv/netbackup/bp.conf >>$SUBOUTFILE
fi
Section_Footer
fi
}
#
# function dev_Details
#
dev_Details()
{
HEADER="/dev Directory Details"
Section_Header
ls -ialR /dev >>$SUBOUTFILE
Section_Footer
}
#
# function Device_Attributes
#
Device_Attributes()
{
HEADER="Device Attributes (lsattr)"
Section_Header
echo "<ol>" >>$SUBINDFILE
for DEV in `lsdev -C | awk ' { print $1 } ' | sort `
do
SUBHEADER="Device: $DEV"
Sub_Section_Header
lsattr -H -E -l $DEV >>$SUBOUTFILE
Sub_Section_Footer
done
echo "</ol>" >>$SUBINDFILE
Section_Footer
}
#
# function arp_Table
#
arp_Table()
{
HEADER="Arp table"
Section_Header
arp -a >>$SUBOUTFILE
Section_Footer
}
#
# function Login_Details
#
Login_Details()
{
HEADER="Login details (who -a)"
Section_Header
who -a >>$SUBOUTFILE
Section_Footer
}
#
# function Subsys_Details
#
Subsys_Details()
{
HEADER="Subsystem details"
Section_Header
lssrc -a >>$SUBOUTFILE
Section_Footer
}
#
# function Process_Details
#
Process_Details()
{
HEADER="Process details"
Section_Header
#
# function rsf_Details
#
rsf_Details()
{
if [ -x /usr/bin/sm_rsf ]
then
HEADER="RSF details"
Section_Header
/usr/bin/sm_rsf status >>$SUBOUTFILE 2>&1
Section_Footer
fi
}
#
# function List_Users
#
List_Users()
{
HEADER="List of Users and attributes"
Section_Header
lsuser -f ALL >>$SUBOUTFILE
Section_Footer
}
#
# function User_Chk
#
User_Chk()
{
HEADER="User definition check"
Section_Header
usrck -n ALL >>$SUBOUTFILE 2>&1
if [ $? -eq 0 ]
then
echo "No errors in User definition check." >>$SUBOUTFILE
fi
Section_Footer
}
#
# function List_Groups
#
List_Groups()
{
HEADER="List of Groups and attributes"
Section_Header
lsgroup -f ALL >>$SUBOUTFILE
Section_Footer
}
#
# function Group_Chk
#
Group_Chk()
{
HEADER="Group definition check"
Section_Header
grpck -n ALL >>$SUBOUTFILE 2>&1
if [ $? -eq 0 ]
then
echo "No errors in Group definition check." >>$SUBOUTFILE
fi
Section_Footer
}
#
# function Role_Details
#
Role_Details()
{
HEADER="Role details"
Section_Header
lsrole -f ALL >>$SUBOUTFILE
Section_Footer
}
#
# function crontab_Details
#
crontab_Details()
{
HEADER="Contents of crontab files"
Section_Header
echo "</pre></p><h3>List of crontab users files & attributes</h3><p><pre>" >>$SUBOUTFILE
ls -l /var/spool/cron/crontabs >>$SUBOUTFILE
echo "<ol>" >>$SUBINDFILE
for F in `ls /var/spool/cron/crontabs`
do
SUBHEADER="Crontab File: $F"
Sub_Section_Header
cat /var/spool/cron/crontabs/$F >>$SUBOUTFILE
Sub_Section_Footer
done
echo "</ol>" >>$SUBINDFILE
Section_Footer
}
If you have such a huge server farm running AIX i'd recommend you to configure the dsh (Distributed Shell) so you can run the prtconf or the script unclebrian posted on all the servers you want at the same time. You can even use OpenSSH connections to secure your communications and have one administrative console from where you issue commands to all your servers.
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.