unix下weblogic检查脚本

set echo on
num=0
loopnum=50
sleep_time=1800

env > env.out
/usr/sbin/kmtune > kmtune.out
/usr/sbin/swlist -l product > swlist.out
/usr/sbin/swapinfo > swapinfo.out
uname -a > uname.out
cat /etc/hosts > hosts.out
hostname > hostname.out
bdf >> bdf.out

echo tcp_time_wait_interval             `ndd -get /dev/tcp tcp_time_wait_interval`      >>tcpip_params.out   
echo tcp_conn_request_max               `ndd -get /dev/tcp tcp_conn_request_max`        >>tcpip_params.out
echo tcp_ip_abort_interval              `ndd -get /dev/tcp tcp_ip_abort_interval`       >>tcpip_params.out
echo tcp_keepalive_interval             `ndd -get /dev/tcp tcp_keepalive_interval`      >>tcpip_params.out
echo tcp_rexmit_interval_initial        `ndd -get /dev/tcp tcp_rexmit_interval_initial` >>tcpip_params.out
echo tcp_rexmit_interval_max            `ndd -get /dev/tcp tcp_rexmit_interval_max`     >>tcpip_params.out
echo tcp_rexmit_interval_min            `ndd -get /dev/tcp tcp_rexmit_interval_min`     >>tcpip_params.out
echo tcp_xmit_hiwater_def               `ndd -get /dev/tcp tcp_xmit_hiwater_def`        >>tcpip_params.out
echo tcp_recv_hiwater_def               `ndd -get /dev/tcp tcp_recv_hiwater_def`        >>tcpip_params.out

# collect wls domain config & runtime log
bea_home=/weblogic/bea
domainhome=/bossapp2/oboss/cboss/cbossdomain
cp $bea_home/license.bea ./
cp $domainhome/config.xml ./
cp $domainhome/*.sh ./



# collect wls domain config & runtime log
beahome=/weblogic/bea
cp $beahome/license.bea ./
cp $beahome/registry.xml ./
cp $beahome/weblogic81/common/bin/commEnv.sh ./

domainhome=/bossapp/oboss/cboss/cbossdomain
tar cvf cbossdomain.tar $domainhome/fileRealm.properties $domainhome/SerializedSystemIni.dat $domainhome/boot.properties $domainhome/config.xml $domainhome/*.sh

domainhome=/bossapp/oboss/dsmp/dsmpdomain
tar cvf dsmpdomain.tar $domainhome/fileRealm.properties $domainhome/SerializedSystemIni.dat $domainhome/boot.properties $domainhome/config.xml $domainhome/*.sh

domainhome=/bossapp/oboss/iagw/iagwdomain
tar cvf iagwdomain.tar $domainhome/fileRealm.properties $domainhome/SerializedSystemIni.dat $domainhome/boot.properties $domainhome/config.xml $domainhome/*.sh

domainhome=/bossapp/oboss/music/musicdomain
tar cvf musicdomain.tar $domainhome/fileRealm.properties $domainhome/SerializedSystemIni.dat $domainhome/boot.properties $domainhome/config.xml $domainhome/*.sh

domainhome=/bossapp/oboss/switch12580/switchdomain
tar cvf switchdomain.tar $domainhome/fileRealm.properties $domainhome/SerializedSystemIni.dat $domainhome/boot.properties $domainhome/config.xml $domainhome/*.sh

domainhome=/bossapp/oboss/dcsdom/dcsdomain
tar cvf dcsdomain.tar $domainhome/fileRealm.properties $domainhome/SerializedSystemIni.dat $domainhome/boot.properties $domainhome/config.xml $domainhome/*.sh

domainhome=/bossapp/oboss/gprspos/posdomain
tar cvf posdomain.tar $domainhome/fileRealm.properties $domainhome/SerializedSystemIni.dat $domainhome/boot.properties $domainhome/config.xml $domainhome/*.sh

domainhome=/bossapp/oboss/mvcdom/mvcdomain
tar cvf mvcdomain.tar $domainhome/fileRealm.properties $domainhome/SerializedSystemIni.dat $domainhome/boot.properties $domainhome/config.xml $domainhome/*.sh


while [ $num -lt $loopnum ]
do
   num=`echo "$num + 1" | bc`

   echo `date "+%y/%m/%d %H/%M/%S"`"\t\c"  1>>vmstat.out 2>>vmstat.err
   vmstat  1 20 >> vmstat.out
   echo "" >>vmstat.out  

   sleep $sleep_time
done
exit

你可能感兴趣的:(xml,unix,weblogic,脚本)