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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EMC Grab like utility 1

Status
Not open for further replies.

mag007

IS-IT--Management
Nov 8, 2006
99
US
Hi All,

Is there an EMC Grab type utility on AIX? I would like to take a daily snapshot of the system, so I have a hard paper copy. Information such as: hostname, network, lsvg, lsvg -l, etc... should be included in the snapshot.

Or is a script the way to go for this?

TIA
 
You'll need to script it.

The good news is you'll only capture exactly what you want! :)

- Rod


IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

Wish you could view posts with a fixed font? Got Firefox & Greasemonkey? Give yourself the option.
 
Check this out:


You can run this script in cron and print the output text file or uuencode the html doc it creates and send it via sendmail as an attachment.

Ethan
 
If it was me i would do same as what RodKnowlton said! (specially if i'm in a production environment)

just script it. issue whatever command you want and forward it to a file

hostname >> output.txt
lsvg >> output.txt
lsvg -l >> output.txt
.
.
.

and so on. Then as bambock said put it in the crontab as a daily job.

Good luck my friend

Regards,
Khalid
 
Here's something I've used in the past.

Code:
SYSDOC SCRIPT
#
# Start of Sysdoc Script
#!/usr/bin/ksh
# Print system documentation for RS/6ØØØ and pSeries running AIX 5.X

function printtitle
{
echo "<P><TITLE>"
echo $*
echo "</TITLE>"
}

function printhead
{
echo "<P><H1>"
echo $*
echo "</H1>"
}

function printhead2
{
echo "<P><H2>"
echo "<A NAME=\"$2\">$1</A>"
echo "</H2>"
}

function printhead3
{
echo "<P><H3>"
echo "<A NAME=\"$2\">$1</A>"
echo "</H3>"
echo "<A HREF=\"#Ø\">Back</A>"
}

function printhead3_no_backlink
{
echo "<P><H3>"
echo "<A NAME=\"$2\">$1</A>"
echo "</H3>"
}

function printtext
{
echo "<P><PRE>"
echo $* | awk '{print "<BR>" $Ø}'
echo "</PRE>"
}

function printcom
{
if [[ "$VERBOSE" = "TRUE" ]]
then
echo "<B>"
echo "The following output has been produced by command: "
echo "<I>"
echo $*
echo "</B></I>"
fi
echo "<P><PRE>"
$* | awk '{print "<BR>" $Ø}'
echo "</PRE>"
}

function printcom_and_text
{
printhead3_no_backlink "$2"
printcom $1
}

function printcom2
{
if [[ "$VERBOSE" = "TRUE" ]]
then
echo "<B>"
echo "The following output has been produced by command: "
echo "<I>"
echo $1 '|' $2
echo "</B></I>"
fi
echo "<P><PRE>"
$1 | $2 | awk '{print "<BR>" $Ø}'
echo "</PRE>"
}

function printcom_trim
{
if [[ "$VERBOSE" = "TRUE" ]]
then
echo "<B>"
echo "The following output has been produced by command: "
echo "<I>"
echo $*
echo "</B></I>"
fi
echo "<P><PRE>"
$* | sed '/^#.*/d' | tr ':' '\Ø11' | awk '{print "<BR>" $Ø}'
echo "</PRE>"
}

function printfile
{
if [[ "$VERBOSE" = "TRUE" ]]
then
echo "<B>"
echo "The following output has been produced by command: "
echo "<I>"
echo "cat $1 | sed '/^[#:\*].*/d'"
echo "</B></I>"
fi
if [[ -f $1 ]]
then
printhead3_no_backlink $1
echo "<P><PRE>"
egrep -v '^#|^[ ]*$' $1 # remove comment and empty lines
echo "</PRE>"
else
printhead3_no_backlink $1
printhead3_no_backlink "not found on this system"
fi
}

function STD
{
exec 3>&1
($* 2>&1 1>&3) | sed -e 's/^/<FONT
COLOR=\"RED\"><B>ERROR: /' -e
's/$/<\/B><\/FONT>/' >&1
}

function printAnchor
{
echo "<TR><TD>"
echo "<A HREF=\"#$3\">$1</A>"
echo "</TD><TD>"
echo "<A HREF=\"#$3\">$2</A>"
echo "</TD></TR>"
}

XP_DISKS()
{
printcom echo "Creating XP Disks Layout ...."
printcom xpinfo
}

#-----------------------------------------
# EMC Prodcedure
#-----------------------------------------

EMC_DISKS()
{
printcom echo "Creating EMC Disks Layout ...."
if [ -x /usr/symcli/bin/syminq ]
then
printcom /usr/symcli/bin/syminq -sym
else
echo "<FONT COLOR=\"RED\"><B>WARNING: </B></FONT><BR>"
echo "<FONT COLOR=\"RED\"><B>WARNING: There is no
executable /usr/symcli/bin/syminq</B></FONT><BR>"
echo "<FONT COLOR=\"RED\"><B>WARNING: to output the
information about the SYMMETRIX storage</B></FONT><BRecho "<FONT COLOR=\"RED\"><B>WARNING: </B></FONT><BR>"
fi
}

#-----------------------------------------
# DGC Prodcedure - CLARiiON CX6ØØ Array
#-----------------------------------------
#Note that this procedure merely identifies the disks by name,
# but IS NOT able
#to determine the number of links to the storage arrary.
#Multiple links will multiply the total capacity by the number of links
!

DGC_DISKS()
{
printcom echo "Creating CLARiiON Disks Layout ...."
if [ -x /usr/symcli/bin/syminq ]
then
printcom /usr/symcli/bin/syminq -powerpath
else
echo "<FONT COLOR=\"RED\"><B>WARNING: </B></FONT><BR>"
echo "<FONT COLOR=\"RED\"><B>WARNING: There is no
executable /usr/symcli/bin/syminq</B></FONT><BR>"
echo "<FONT COLOR=\"RED\"><B>WARNING: to output the
information about the CLARiiON storage</B></FONT><BR>"
echo "<FONT COLOR=\"RED\"><B>WARNING: </B></FONT><BR>"
fi
}

AIX_STANDARD_DISKS()
{
printcom echo "Creating Standard Disks Layout ...."
printcom lsdev -Cc disk | grep LVD
}

#-----------------------------------------
# AIX FibreCard RAID Prodcedure
#-----------------------------------------

AIX_FC_RAID_DISKS()
{
echo "Creating FibreCard RAID Disks Layout"
}

#-----------------------------------------
# AIX SSA disks
#-----------------------------------------

AIX_SSA_DISKS()
{
## echo "Creating SSA Disks Layout ...."
for i in 'ssadisk -a ssaØ -P'>"
do
printcom lsdev -C -l $i
done
}

POWER_PATH()
{
printcom powermt display
printcom powermt display dev=all
}

HDLM_PATH()
{
BIN=/usr/DynamicLinkManager/bin/dlnkmgr
printcom $BIN view -sys
printcom $BIN view -path
}

MPIO_PATH()
{
printtext "MPIO Paths"
printcom2 "lspath" "sort +1"
for disk in $(lspath|awk '{print $2}'|sort -u)
do
printcom_and_text "lsattr -El $disk" "Attributes of $disk"
printcom_and_text "lspath -l $disk -r parent"
"Parent(s) of $disk"
done
}

DATA_PATH()
{
printcom datapath query adapter
printcom datapath query device
printcom lsvpcfg
}

AIX_Layout()
{
LOGIOSCAN=/tmp/Ioscan_'hostname'
XPLOG=/tmp/xp.log
XPLOG2=/tmp/xp2.log
XPLOG3=/tmp/xp3.log
VA71ØØLOG=/tmp/va71ØØ.log
STANDLOG=/tmp/stand.log
AUTOLOG=/tmp/auto.log
AUTOLOG2=/tmp/auto2.log
SUMMARY1LOG=/tmp/summary1.log
EMCLOG=/tmp/emc.log
EMCLOG2=/tmp/emc2.log
EMCLOG3=/tmp/emc3.log
A5ØØØ=/tmp/a5ØØØ.log
CCISSLOG=/tmp/cciss.log
XPFLAG=OPEN
EMCFLAG=EMC
DGCFLAG=DGC
BINDIR="/usr/local/ADMIN/INFOUX/bin/"

lsdev -Cc disk > $LOGIOSCAN

XPINFO='whence xpinfo'

[ $? -eq Ø ] && $XPINFO -i >> $LOGIOSCAN

AIX_STANDARD_DISKS

INQ=$BINDIR/IBM_inq
[ $? -eq Ø ] && $INQ 2>/dev/null >> $LOGIOSCAN
[ -n "$(cat $LOGIOSCAN | grep $XPFLAG)" ] && XP_DISKS
[ -n "$(cat $LOGIOSCAN | grep $EMCFLAG)" ] && EMC_DISKS
[ -n "$(cat $LOGIOSCAN | grep $DGCFLAG)" ] && DGC_DISKS

for i in $(lsdev -CS1 -cpdisk -sssar -F name)
do
echo "$i: "$(ssaxlate -l $i) > /tmp/ssa
done

[ -s /tmp/ssa ] && AIX_SSA_DISKS
}

MultiPathing()
{
POWERFLAG=PowerPath
HDLMFLAG=AutoPath
MPIOFLAG=MPIO
[ -n "$(lslpp -l | grep $POWERFLAG)" ] && POWER_PATH
[ -n "$(lslpp -l | grep $HDLMFLAG)" ] && HDLM_PATH
[ -n "$(lsdev -Cc disk | grep $MPIOFLAG)" ] && MPIO_PATH
if [ -f /usr/sbin/lsvpcfg ]
then
[ -n "$(/usr/sbin/lsvpcfg|wc -c)" ] && DATA_PATH
fi
}

GLOBAL_INF()
{
# System information
msize=Ø
for i in 'lscfg | grep -i mem | awk '{print $2}''
do
((msize=msize + 'lsattr -El memØ | awk '/^size/ {print $2}''))
done
procstr='lsdev -Cc processor'
procspeed='lsattr -El ${procstr%% *} -a frequency -F value'
cputype='getsystype -y'
kerntype='getsystype -K'
lparinfo='uname -L'
# Pre-5.2, 'uname -L' returns a leading "AIX"
# Check for a leading AIX and remove it
if [[ $lparinfo = AIX* ]]
then
lparinfo=${lparinfo#* }
fi
# Ensure that procspeed is not null,
# since the conversion to MHz below will
# cause the script to exit with an error if null.
if [[ ! -z $procspeed ]]
then
# Convert procspeed to MHz, and round up or down
if (( ($procspeed%1ØØØØØØ) >= 5ØØØØØ ))
then
(( procspeedMHz=($procspeed/1ØØØØØØ) + 1 ))
else
(( procspeedMHz=($procspeed/1ØØØØØØ) ))
fi
fi
model='lsattr -El sysØ -a modelname -F value'
# Get Serial number
serial='lscfg -vpl sysplanarØ |/usr/bin/grep -p "System:" |grep
"Machine/Cabinet"`
if [[ $? -eq Ø ]]; then
serial=${serial##*.}
else
serial='lscfg -vpl sysplanarØ |/usr/bin/grep -p "System VPD:" |grep
"Machine/Cabinet"`
if [[ $? -eq Ø ]]; then
serial=${serial##*.}
else
noserial=1
fi
fi
gsize='lsattr -El memØ | awk '/^goodsize/ {print $2}''
proc_no='lsdev -Cc processor | head -1 | cut -d' ' -f1'
proctype='lsattr -El $proc_no | awk '/^type/ {print $2}''
numproc='lsdev -Cc processor | grep Available | wc -l'
numproc=${numproc##* }
fwversion='lsattr -El sysØ -a fwversion -F value'
conslogin='lsattr -El sysØ -a conslogin -F value'
autorestart='lsattr -El sysØ -a autorestart -F value'
fullcore='lsattr -El sysØ -a fullcore -F value'
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 1 "System Model:"
echo " ${model}"
#Print out serial if found, otherwise "Not available"
if [[ -z $noserial ]] then
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 52 "Machine Serial Number:"
echo " ${serial}"
else
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 52 "Machine Serial Number:"
print " \c"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 53 "Not Available"
fi
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 5 "Processor Type:"
echo " ${proctype}"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 4 "Number Of Processors:"
echo " ${numproc}"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 48 "Processor Clock Speed:"
echo " ${procspeedMHz} MHz"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 49 "CPU Type:"
echo " ${cputype}-bit"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 5Ø "Kernel Type:"
echo " ${kerntype}-bit"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 51 "LPAR Info:"
echo " ${lparinfo}"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 2 "Memory Size:"
echo " ${msize} MB"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 3 "Good Memory Size:"
echo " ${gsize} MB"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 6 "Firmware Version:"
echo " ${fwversion}"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 7 "Console Login:"
echo " ${conslogin}"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 8 "Auto Restart:"
echo " ${autorestart}"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 9 "Full Core:"
echo " ${fullcore}"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 777 "Multi-Processor Capability:"
(( $(bootinfo -z) == Ø )) && echo No || echo Yes
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 777 "Boot List::"
printcom "bootlist -m normal -o"
/usr/bin/dspmsg -s 1 cmdsolsysmgt.cat 777 "Booted From::"
printcom "bootinfo -b"
echo "Display System Rset Contents"
printcom "lsrset -av"
echo "Uptime, What"
printcom "w"
echo "Display Summary of Statistics since boot"
printcom "vmstat"
echo "Display Fork statistics"
printcom "vmstat -f"
echo "Displays the number of Interrupts"
printcom "vmstat -i"
echo "List Sum of paging events"
printcom "vmstat -s"
echo "Report CPU and I/O statistics"
printcom "iostat"
echo "List Kernel Lock Tracing current Status"
printcom "locktrace -l"
}

#
# Print 2 lines of mandatory output
#

echo '<HTML>'
echo

#
# Start of the main program
#############################################################

HOSTNAME=$(hostname)
DATE=$(date)
IT="<I>"
E_IT="</I>"
PDISKS='lspv | grep active | awk '{print $1}''
VGS='lsvg -o' # List VG infor for available VG's only !

#
# Options Setting
#

cc='echo $QUERY_STRING|grep VERBOSE|wc -c'

if [ $cc -gt Ø ]
then
VERBOSE="TRUE"
fi

cc='echo $QUERY_STRING|grep SOFTWARE|wc -c'

if [ $cc -gt Ø ]
then
SOFTWARE="TRUE"
fi

cc='echo $QUERY_STRING|grep HARDWARE|wc -c'

if [ $cc -gt Ø ]
then
HARDWARE="TRUE"
fi

cc='echo $QUERY_STRING|grep STORAGE|wc -c'

if [ $cc -gt Ø ]
then
STORAGE="TRUE"
fi

cc='echo $QUERY_STRING|grep USERS|wc -c'

if [ $cc -gt Ø ]
then
USERS="TRUE"
fi

cc='echo $QUERY_STRING|grep COMMS|wc -c'

if [ $cc -gt Ø ]
then
COMMS="TRUE"
fi

cc='echo $QUERY_STRING|grep SYSENV|wc -c'

if [ $cc -gt Ø ]
then
SYSENV="TRUE"
fi

cc='echo $QUERY_STRING|grep LUM|wc -c'

if [ $cc -gt Ø ]
then
LUM="TRUE"
fi

cc='echo $QUERY_STRING|grep MISCFILES|wc -c'

if [ $cc -gt Ø ]
then
MISCFILES="TRUE"
fi

cc='echo $QUERY_STRING|grep CRONFILES|wc -c'

if [ $cc -gt Ø ]
then
CRONFILES="TRUE"
fi

SOFTWARE="TRUE"
HARDWARE="TRUE"
STORAGE="TRUE"
SYSENV="TRUE"
USERS="TRUE"
COMMS="TRUE"
LUM="TRUE"
MISCFILES="TRUE"
CRONFILES="TRUE"

if [[ "$SOFTWARE" = "TRUE" || "$HARDWARE" = "TRUE" || "$STORAGE" =
"TRUE" || "$USERS" = "TRUE" || "$COMMS" = "TRUE" || "$SYSENV" = "TRUE"
|| "$DATAPATHFLAG" = "TRUE" || "$LUM" = "TRUE" || "$MISCFILES" = "TRUE"
|| "$CRONFILES" = "TRUE" ]]

then

printtitle Configuration information for host $HOSTNAME on $DATE
printhead Configuration information for host $IT$HOSTNAME$E_IT on
$IT$DATE$E_IT

else

printhead2 "No Sections Selected" Ø

fi

###################################################
# Here comes the contents table
###################################################

printhead2 "Contents:" Ø
echo "<TABLE>"

if [[ "$SOFTWARE" = "TRUE" ]]
then
printAnchor Software "<BR>" 1
printAnchor "<BR>" "Level of AIX Operating System" 1.1
printAnchor "<BR>" "Installed Software" 1.2
printAnchor "<BR>" "Extended Installed Software
Information" 1.3
fi

if [[ "$HARDWARE" = "TRUE" ]]
then
printAnchor Hardware "<BR>" 2
printAnchor "<BR>" "Global Parameters" 2.Ø1
printAnchor "<BR>" "System Parameters" 2.1
printAnchor "<BR>" "Installed Devices" 2.2
printAnchor "<BR>" "Extended Hardware Configuration" 2.3
fi

if [[ "$STORAGE" = "TRUE" ]]
then
printAnchor Storage "<BR>" 4
printAnchor "<BR>" "Storage information" 4.Ø1
printAnchor "<BR>" "MultiPathing information" 4.Ø2
printAnchor "<BR>" "Installed Physical Disks" 4.1
printAnchor "<BR>" "Volume Groups" 4.2
printAnchor "<BR>" "Online Volume Groups" 4.3
printAnchor "<BR>" "Volume Groups Characteristics" 4.4
printAnchor "<BR>" "Physical Disks Distribution per
Volume Group" 4.5
printAnchor "<BR>" "Logical Volumes Distribution per
Volume Group" 4.6
printAnchor "<BR>" "Logical Volumes Distribution per
Physical Disk" 4.7
printAnchor "<BR>" "Logical Volumes Characteristics" 4.8
printAnchor "<BR>" "Paging Space Layout and Utilization" 4.9
printAnchor "<BR>" "File Systems" 4.1Ø
printAnchor "<BR>" "Mounted File Systems" 4.11
fi

if [[ "$USERS" = "TRUE" ]]
then
printAnchor "Users Information" "<BR>" 5
printAnchor "<BR>" Users 5.1
printAnchor "<BR>" Groups 5.2
printAnchor "<BR>" Roles 5.3
fi

if [[ "$COMMS" = "TRUE" ]]
then
printAnchor "Communications" "<BR>" 6
printAnchor "<BR>" Hostname 6.1
printAnchor "<BR>" "Network Status" 6.2
printAnchor "<BR>" "Arp Table" 6.3
printAnchor "<BR>" "Routing Table" 6.4
printAnchor "<BR>" "Network Interfaces" 6.5
printAnchor "<BR>" "Name Resolution /etc/hosts" 6.6
printAnchor "<BR>" "Name Resolution /etc/resolv.conf" 6.7
printAnchor "<BR>" "Client Network Services
/etc/services" 6.8
printAnchor "<BR>" "Protocols /etc/protocols" 6.9
printAnchor "<BR>" "Syslog Configuration
/etc/syslog.conf" 6.1Ø
printAnchor "<BR>" "Remote Host Access Control
/etc/hosts.equiv" 6.11
printAnchor "<BR>" "NFS and NIS Info " 6.11
fi

if [[ "$SYSENV" = "TRUE" ]]
then
printAnchor "System Environments" "<BR>" 7
printAnchor "<BR>" "/etc/inittab" 7.1
printAnchor "<BR>" "Subsystems" 7.2
printAnchor "<BR>" TimeZone 7.3
fi

if [[ "$LUM" = "TRUE" ]]
then
printAnchor "License Use Manager" "<BR>" 8
fi

if [[ "$MISCFILES" = "TRUE" ]]
then
printAnchor "Miscellanious Files" "<BR>" 9
fi

if [[ "$CRONFILES" = "TRUE" ]]
then
printAnchor "Cron Files" "<BR>" 1Ø
printAnchor "<BR>" "Cron Allow and Deny Files" 1Ø.1
printAnchor "<BR>" "Users Cron Files" 1Ø.2
fi

echo "</TABLE>"

###################################################
Until here comes the contents table
###################################################

if [[ -f /usr/local/ADMIN/etc/Machine.profile ]]
then
printhead3 Machine Profile file
printfile /usr/local/ADMIN/etc/Machine.profile
fi

if [[ "$SOFTWARE" = "TRUE" ]]
then
printhead2 Software 1
printhead3 "Level of AIX Operating System" 1.1
printcom oslevel -r
printhead3 "Installed Software" 1.2
printcom STD lslpp -l
printhead3 "Extended Installed Software Information" 1.2
printcom STD lslpp -La
fi

if [[ "$HARDWARE" = "TRUE" ]]
then
printhead2 "Hardware" 2
printhead3 "Global Parameters" 2.Ø1
printcom GLOBAL_INF
printhead3 "System Parameters" 2.1
printcom STD lsattr -E -H -l sysØ
printhead3 "Installed Devices" 2.2
printcom STD "lsdev -C"
printhead3 "Extended Hardware Configuration" 2.3
printcom STD "lscfg -pv"
fi

if [[ "$STORAGE" = "TRUE" ]]
then
printhead2 Storage 4
printhead3 "Storage information" 4.Ø1
AIX_Layout
printhead3 "MultiPathing information" 4.Ø2
MultiPathing
printhead3 "Installed Physical Disks" 4.1
printcom STD lspv
printhead3 "Volume Groups" 4.2
printcom STD lsvg
printhead3 "Online Volume Groups" 4.3
printcom STD lsvg -o
printhead3 "Volume Groups Characteristics" 4.4

for i in $VGS
do
printcom STD lsvg $i
done
printhead3 "Physical Disks Distribution per Volume Group" 4.5
for i in $VGS
do
printcom STD lsvg -p $i
done
printhead3 "Logical Volumes Distribution per Volume Group" 4.6
for i in $VGS
do
printcom STD lsvg -l $i
done
printhead3 "Logical Volumes Distribution per Physical Disk" 4.7
for i in $PDISKS
do
printcom STD lspv -l $i
done
printhead3 "Logical Volumes Characteristics" 4.8
for j in $VGS
do
LVS='lsvg -l $j|grep '/'|awk '{print $1}''
for i in $LVS
do
printcom STD lslv $i
done
done
printhead3 "Paging Space Layout and Utilization" 4.9
for PS in 'lsps -a -l'
do
printcom echo $PS:
printcom STD lsps $PS
done
# printcom lsps -a
printhead3 "File Systems" 4.1Ø
printcom STD lsfs -a -q
printhead3 "Mounted File Systems" 4.11
printcom mount
fi

if [[ "$USERS" = "TRUE" ]]
then
printhead2 "Users Information" 5
printhead3 Users 5.1
printtext "Name Id Group(s) Home Directory Shell"
printcom_trim lsuser -c ALL
printhead3 Groups 5.2
printtext "Name Id Admin Members"
printcom_trim lsgroup -c ALL
printhead3 Roles 5.3
printcom_trim lsrole -c ALL
fi

if [[ "$COMMS" = "TRUE" ]]
then
printhead2 Communications 6
printhead3 Hostname 6.1
printcom hostname
printhead3 "Network Status" 6.2
printcom_and_text "netstat -in" "List of all IP addresses"
printcom_and_text "ifconfig -a" "Display information about all
network interfaces"
printcom_and_text "no -a" "Display current network attributes in the
kernel"
printcom_and_text "netstat -nr" "List of all routing table entries by
IP-address"
printcom_and_text "netstat -an" "Show the state of all sockets"
printcom_and_text "netstat -An" "Show the address of any PCB
associated with the sockets"
printcom_and_text "netstat -s" "Show statistics for each protocol"
printcom_and_text "netstat -sr" "Show the routing statistics"
printcom_and_text "netstat -v" "Show statistics for CDLI-based
communications adapters"
printcom_and_text "netstat -m" "Show statistics recorded by memory
management routines"
printhead3 "Arp Table" 6.3
printcom arp -a
printhead3 "Routing Table" 6.4
printcom netstat -r
printhead3 "Network Interfaces" 6.5
printcom lsdev -C -c if
printhead3 "Name Resolution file" 6.6
printfile /etc/hosts
printhead3 "Name Resolution file" 6.7
printfile /etc/resolv.conf
printhead3 "Client Network Services file" 6.8
printfile /etc/services
printhead3 "Protocols file" 6.9
printfile /etc/protocols
printhead3 "Syslog Configuration file" 6.1Ø
printfile /etc/syslog.conf
printhead3 "Remote Host Access Control file" 6.11
printfile /etc/hosts.equiv
printhead3 "NFS and NIS Info" 6.12
printcom_and_text "lsfs -v nfs" "NFS filesystems mounted from remote
hosts"
printhead3_no_backlink "Local Directories Exported by NFS"
printfile /etc/exports
printcom_and_text "nfso -a" "List Network File System (NFS) network
variables"
printcom_and_text "rpcinfo" "Display a List of Registered RPC
Programs"
printcom_and_text "rpcinfo -m" "rpcinfo -m"
printcom_and_text "rpcinfo -s" "rpcinfo -s "
printcom_and_text "lsnamsv -C" "DNS Resolver Configuration: lsnamsv
-C"
printcom_and_text "namerslv -s" "Display all Name Server Entries"
printcom_and_text "domainname" "NIS Domain Name"
printcom_and_text "ypwhich" "NIS Server currently used"
printcom_and_text "lsclient -l" "NIS Client Configuration"
fi

if [[ "$SYSENV" = "TRUE" ]]
then
printhead2 "System Environments" 7
printhead3 "Inittab file" 7.1
printfile /etc/inittab
printhead3 Subsystems 7.2
printcom lssrc -a
printhead3 TimeZone 7.3
printtext $TZ
fi

######################################################################
# LUM License Configuration
######################################################################

if [ "$LUM" = "TRUE" ]
then
printhead2 "License Use Manager" 8
printhead3 "" 8

for FILE in /var/ifor/nodelock /var/ifor/i4ls.ini /var/ifor/i4ls.rc
/etc/ncs/glb_site.txt /etc/ncs/glb_obj.txt
do
printfile "${FILE}"
done
/usr/opt/ifor/bin/i4cfg -list | grep -q 'active'
rc=$?

if (( $rc == Ø ))
then
printcom_and_text "/usr/opt/ifor/bin/i4blt -ll -n $(uname -n)"
"Installed Floating Licenses"
printcom_and_text "/usr/opt/ifor/bin/i4blt -s -n $(uname -n)"
"Status of Floating Licenses"
fi

printcom_and_text "inulag -lc" "License Agreements Manager"
printcom_and_text "lslicense" "Display fixed and floating OS Users
Licenses"
fi

if [ "$MISCFILES" = "TRUE" ]
then
printhead2 "Miscellanious Files" 9
printhead3 "" 9
files(){
echo /etc/aliases
echo /etc/binld.cnf
echo /etc/bootptab
echo /etc/dhcpcd.ini
echo /etc/dhcprd.cnf
echo /etc/dhcpsd.cnf
echo /etc/dlpi.conf
echo /etc/environment
echo /etc/ftpusers
echo /etc/gated.conf
echo /etc/hostmibd.conf
echo /etc/hosts.lpd
echo /etc/inetd.conf
echo /etc/mib.defs
echo /etc/mrouted.conf
echo /etc/netgroup
echo /etc/netsvc.conf
echo /etc/ntp.conf
echo /etc/oratab
echo /etc/policyd.conf
echo /etc/pse.conf
echo /etc/pse_tune.conf
echo /etc/pxed.cnf
echo /etc/qconfig
echo /etc/filesystems
echo /etc/rc
echo /etc/rc.adtranz
echo /etc/rc.bsdnet
echo /etc/rc.licstart
echo /etc/rc.net
echo /etc/rc.net.serial
echo /etc/rc.oracle
echo /etc/rc.qos
echo /etc/rc.shutdown
echo /etc/rc.tcpip
echo /etc/rsvpd.conf
echo /etc/sendmail.cf
echo /etc/slip.hosts
echo /etc/snmpd.conf
echo /etc/snmpd.peers
echo /etc/telnet.conf
echo /etc/xtiso.conf
echo /opt/ls3/ls3.sh
echo /usr/tivoli/tsm/client/ba/bin/rc.dsmsched
echo /usr/tivoli/tsm/server/bin/rc.adsmserv
find /etc/rc.d -type f -print
}

for FILE in $(files)
do
printfile "${FILE}"
done
fi

if [ "$CRONFILES" = "TRUE" ]
then
printhead2 "Cron Files" 1Ø
printhead3 "Cron Allow and Deny Files" 1Ø.1
printfile /var/adm/cron/cron.allow
printfile /var/adm/cron/cron.deny
files(){
find /var/spool/cron/crontabs -type f -print
}
printhead3 "Users Crontab Files" 1Ø.2
for FILE in $(files)
do
printfile "${FILE}"
done
printcom_and_text "at -l" "AT Jobs"
fi

echo '</HTML>'
# End Of Sysdoc Script

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."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top