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!

How to print system database 1

Status
Not open for further replies.

Mushr00m

IS-IT--Management
May 6, 2002
38
MY
I need some recommended AIX commands to have
a RS/6000 system setting or user creation information
to be on print out on hardcopy/printer for system dissaster
recovery reference.

Example as shown below:

a) System default or global value setting
b) Network such as TCP/IP information setting
c) License/Software Instllation information
d) Print out on File System, such as PV's, VG's & LV's
e) System hardware configuration information
f) Use profiles/ID information for re-creation
 
I would suggest looking around in smitty and writing down commands it uses to get respective reports, and then putting it in one text file and printing out all at once

Setting printer is in fastpath smitty spooler, have a look at rootvg.net - it has fastpath list
 
The smit.script file is a great resource for that sort of command-harvesting.
 
I have a script that I run in cron that gets information about the system that may be use to you. I run the script every night and rcp the output to another system for safekeeping. I think this may be what you are looking for. Post your email address and I will send it to you.
 
We use a script to get the system information and ftp it to another machine which is a webserver. So we can access the information from the webpage. If you want to take a look at the script then give your email address.
 
Hi guys,

I would be glad if you could email me the script. It will sure help me alot. My email is hood@first.com.my.


cheers
 
Hello bi, anshudad and mushrOOm,

I saw MushrOOm's question, and I am also intrested in the scripts. My email address is: r.kraaijenvanger@ohra.nl

Thanks in advance.
 
If you want to go nuts... we run this every couple of months:

/usr/sbin/snap -a -d /tmp/snap
 
anshudad: maybe type your secret script in in FAQs?
 
Perhaps this can be of some help...It can be modified to add rc.net, and maybe other DNS stuff.......or special files...etc........vmtune, schedtune info etc....
Hope it helps.?
--------------------

#!/bin/ksh
# saveyosys.sh # This is a script that creates important input
# for your system in case of a major disaster
# It should be run periodically, whenever a
# change is made to the system, or new equipment
# added. The output should be printed out and
# saved offsite and on site.
# It is suggested that you have a mksysb, backups
# and bootable disks or install media in addition
# to this script output. We do not guarantee
# this script will give you everything you
# will need in the event of a disaster.
# It is a tool to assist you in gathering needed
# data and information. Hope it helps.
dat=`date +%m%d%y`
exec > saveyosys.$dat
echo `date`
echo `hostname` ; echo "command: hostname"
echo `ifconfig en0` ; echo "command: ifconfig en?"
echo `ifconfig et0`
echo "command oslevel"
echo `oslevel`
echo "----------------------"
echo "maintenance level"
instfix -i | grep ML
echo "------------------------"
echo "kernel running"
echo `bootinfo -K`
echo "----------------------"
echo "paging space currently on system command: lsps -a"
lsps -a
echo "---------------------"
echo "df sizes"
echo `df -k`
echo "----------"
echo "mount command"
echo `mount`
echo "-------"
echo "Physical volume ids command: ipl_varyon -i"
ipl_varyon -i
echo "------------------"
echo "Volume groups"
lsvg
echo "status of volume groups command: lsvg volumegrp"
for VG in `lsvg`
do
lsvg $VG
echo ""
echo "Physical volumes in $VG command: lsvg -p volumegrp "
lsvg -p $VG
echo "------------------"
echo "Logical Volumes and filesystems in $VG command: lsvg -l vg"
echo "-------------------"
lsvg -l $VG
done
echo "----------------------"
echo "Physical Volume command: lspv | awk print 1 "
for PV in `lspv | awk '{print $1}'`
do
echo "---------------------"
echo "Physical status of $PV command: lspv phyical volume"
lspv $PV
echo ""
echo "LV details on $PV command: lspv -p physical volume"
lspv -p $PV
done
echo "-----------------"
echo "Filesystems"
lsfs
echo "---------------------"
echo "details"
grep -v "#" /etc/filesystems
echo "--------------------"
echo "List devices"
echo "lsattr -F attribute value -l device"
for DEVICE in `lsdev -C | grep -v "Logical volume"| grep -v "Volume group" | awk '{print $1}'`
do
echo "$DEVICE"
lsattr -F "description attribute value" -l $DEVICE
echo ""
done
echo "-------------------"
echo " inittab file"
grep -v "#" /etc/inittab
echo "---------------------"
echo " printer file"
grep -v "#" /etc/qconfig
echo "-------------------"
echo "passwords"
grep -v "#" /etc/passwd
echo "hosts"
grep -v "#" /etc/hosts
echo "--------------------"
echo "services"
grep -v "#" /etc/services
echo "-----------------------"
echo "scsi devices "
lsdev -Cs scsi
echo "---------------------- "
echo " no settings"
no -a
echo "---------------------"
echo "lsattr inet0"
lsattr -El inet0
echo "------------"
echo " netstat information"
netstat -v
echo "--------------"

-----------------------------------------------------
of course chmod 755 and chown root.......whatever..........
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top