Sponsored Content
Special Forums Cybersecurity Template for Disaster Recovery Post 39454 by davidg on Tuesday 19th of August 2003 08:28:45 AM
Old 08-19-2003
HHhm, I think I get you.
I don't know a site. I think we do the same.
Gather info for disaster recovery moments. Some dutch words are still in there, but it should be a template, right Smilie

Here it is :

#!/sbin/sh

check_txt="/var/adm/logs/`basename ${0}`.out"

function cmviewcl_func
{
inp_A=${1}
inp_B=${2}
shift 2
inp_C=${*}

if [ "${inp_B}" = "up" ]
then
count=`/usr/sbin/cmviewcl -vl ${inp_A} | awk 'NF > 1' | \
grep -civ -e ${inp_A} -e ${inp_B} ${inp_C}`
else
count=`/usr/sbin/cmviewcl -l ${inp_A} | awk 'NF > 1' | \
grep -civ -e ${inp_A} -e ${inp_B} ${inp_C}`
fi

if [ ${count} != 0 ]
then
echo "=== Start cluster display: "${inp_A} "status" ${inp_B}
if [ "${inp_B}" = "up" ]
then
/usr/sbin/cmviewcl -vl ${inp_A} | awk 'NF > 1' | \
grep -iv -e ${inp_A} -e ${inp_B} ${inp_C}
else
/usr/sbin/cmviewcl -l ${inp_A} | awk 'NF > 1' | \
grep -iv -e ${inp_A} -e ${inp_B} ${inp_C}
fi
echo "=== Einde cluster display: "${inp_A} "status" ${inp_B}
fi
}

(
echo "======== Start controles"
# Test the cluster:
cmviewcl_func cluster up

# Test all nodes:
cmviewcl_func node up -e interface
cmviewcl_func node running

# Test de packages:
cmviewcl_func package up -e status -e fail -e policy
cmviewcl_func package running
cmviewcl_func package enabled

echo "======== Einde controles"
echo ""
echo "$(hostname) system snapshot at $(date)"
echo "-----------------------------------------------"

lf=/var/adm/sysinf.last

case $(hostname) in
nlunx*)
echo "$(ps -ef | grep oracle | grep -v grep |wc -l) oracle database servers running"
echo "$(ps -ef | grep DESCRIPTION | grep -v grep |wc -l) oracle listner servers running"
;;
esac

# list all errors logged since last run
echo "\n\n"
date "+%m %d %H %M %y" | read m d H M y

curdate=$m$d$H$M$y

if [ -r $lf ]; then
startdate=$(cat $lf)
else
d=$(printf "%02d" $((d-7)))
startdate=$m$d$H$M$y
fi

echo $curdate > $lf

echo "xntpdc -p: "
/usr/sbin/xntpdc -p

echo "\n\n"
echo "ntpq -p: "
/usr/sbin/ntpq -p

echo "\n\n"
echo "Display report of last logged errors"
echo "------------------------------------"
mv /var/adm/logs/messages /var/tmp/tmpmessages
cat /var/tmp/tmpmessages
rm /var/tmp/tmpmessages

echo "\n\n"
echo "system lan-settings"
echo "-------------------"
/usr/sbin/lanscan
for i in 0 1 2
do
echo "\nSettings lan${i}:"
/usr/sbin/lanadmin -x $i
echo "---------------------------------------------------------------------"
done

echo "\n\n"
echo "system activity report since midnight"
echo "-------------------------------------"
sar

echo "\n\n"
echo "current system activity report"
echo "------------------------------"
sar 2 2

echo "\n\n"
echo "HA-cluster overzicht"
echo "--------------------"
cmviewcl -v

echo "\n\n"
echo "vmstat activity report"
echo "----------------------"
vmstat 2 3

echo "\n\n"
echo "process list"
echo "------------"
ps -ef | sort -r -k7.1

echo "\n\n"
echo "Total number of processes: " $(ps -ef | grep -v grep | wc -l)

echo "\n\n"
echo "disk usage"
echo "----------"
df -kP

) 2>&1 | tee ${check_txt} | mailx -s "system snapshot $(hostname)" root
 

9 More Discussions You Might Find Interesting

1. Cybersecurity

Please Tell Me About Disaster Recovery

please tell me if this thinkin is correct, if not, please corret me: disaster recovery means when something bad happens and you need to retrieved a backed up file, all you have to do is cd into the tape drive and then look for the file you want and extract it from the drive. is this... (3 Replies)
Discussion started by: TRUEST
3 Replies

2. UNIX for Advanced & Expert Users

Disaster Recovery

Can anyone tell me of what to expect? I've been nominated to join a team of unix admins to do a DR testing. we already have the guys who are gono be doing the restores. besides the restore, anybody know what else to look forward to?? (2 Replies)
Discussion started by: TRUEST
2 Replies

3. UNIX for Dummies Questions & Answers

disaster recovery

I am looking into disaster recovery and I wanted to know what files and/or other information do I need to keep copies of to sucessfully restore my system from the ground up..... Any help is greatly appreciated. I am running Solaris 8 on an Ultra 60. (5 Replies)
Discussion started by: rod23
5 Replies

4. Solaris

Disaster Recovery

Recovering Solaris to an alternate server I was just wondering if anyone could give me some points on restoring a Solaris 9 backup to an alternate server. Basically, we use netbackup 6 and I was wondering what the best procedures are for doing this? What things do we need to take into... (3 Replies)
Discussion started by: aaron2k
3 Replies

5. Solaris

Sun Solaris Disaster Recovery Plan ...

Hi all, I'm new in this domain, and on this operating system, but in my job, i have to find a way to make a disaster recovery plan for our server (sun solaris) which has the oracle database. I don't have any standby servers to be used for data replication, i only want to use CD's to put on... (4 Replies)
Discussion started by: sam212
4 Replies

6. AIX

AIX disaster recovery

Are there any products out there that provide a disk imaging solution for AIX (and HPUX and Solaris for that matter)? In a development environment where users are looking to restore an OS quickly back to a certain point in time, what is there available for this besides opening up the system,... (7 Replies)
Discussion started by: tb0ne
7 Replies

7. AIX

hacmp and disaster recovery question

Hi Guys, is it possible to failover a hacmp cluster in one datacentre via SRDF to a single node in another datacentre, or do I need a cluster there in any case? This is only meant as worst case scenario and my company doesn't want to spend more money than absolutely necessary. I know the... (3 Replies)
Discussion started by: zxmaus
3 Replies

8. UNIX for Dummies Questions & Answers

Disaster Recovery - Help needed

We have a SCO OpenServer Unix server that has been damaged. Fortunately we have a good backup of the entire system (using BackupEdge.) On a new server, if we install SCO from original SCO CD's (we have all necessary activation codes) then drop the tape (we can restore with tar), will the... (3 Replies)
Discussion started by: jmhohne
3 Replies

9. Red Hat

Disaster Recovery

Hi, I just want to throw something out there for opinions and viewpoints relating to a Disaster Recovery site. Besides the live production environment, do you think a DR environment should include: - pre-production environment - QA Environment ......or would this be considered to be OTT... (3 Replies)
Discussion started by: Duffs22
3 Replies
All times are GMT -4. The time now is 09:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy