header

Shell script for stopping and starting App server/PSUNX

This script can be scheduled with cronjob for auto reboot and cache clear for PeopleSoft Application server and Process schedular

#!/bin/ksh

. /export/home/pshrs1/.profile

DATE=`date +%m%d%y%H%M%S`

PS_HOME=/pshrs1/hrms

export PS_HOME

TUXDIR=/pshrm2/tuxedo81

export TUXDIR

echo `date` " Stopping and starting hrs1 Application server..."

cd /pshrs1/hrms/appserv

psadmin -c shutdown -d hrs1 > /pshrs1/hrms/appserv/APPLOG/Stop_$DATE.log

psadmin -p stop -d HRS1 >> /pshrs1/hrms/appserv/APPLOG/Stop_DATE.log

sleep 10

echo `date` " Clearing cache for Application server"

rm -rf /pshrs1/hrms/appserv/hrs1/CACHE/*

sleep 20

psadmin -c boot -d hrs1 > /pshrs1/hrms/appserv/APPLOG/Start_$DATE.log

psadmin -p start -d HRS1 >> /pshrs1/hrms/appserv/APPLOG/Start_$DATE.log

No comments: