Wednesday, April 30, 2008
Monitoring Scripts
Application Server:
appsrv-status.sh
parameter file
Process Scheduler:
prcs-status.sh
parameter file
Process Scheduler Start-Stop:
prcs-start-stop.sh
parameter file
Useful Unix Commands for PS Admin activity
du -skh * // summarize disk usage...
du -skh . // summarize disk usage...
// displays number of free disk blocks and free files of of PWD's file system
df -kh .
// displays number of free disk blocks and free files of all file systems
$df -kh
$ uname -a // print name of current system
SunOS frc25k8d13z1 5.10 Generic_118833-02 sun4u sparc SUNW,Sun-Fire-15000
// looks for the filenames starting with appsrv* in PWD (.)
$find . -name appsrv* -print
// looks for the filenames starting with appsrv* in directory DirName
$find DirName -name appsrv* -mtime +15 –print
//command to know the nature of the OS (SunOS/Solaris only)
$isainfo -b
example:
$echo "Welcome to "`isainfo -b`"-bit Solaris"
# Output can be directed to another program or to a file.
# send output to a file
command > /tmp/output.log
# redirect error output
command > /tmp/output.log 2> /tmp/errors.log
# send output to grep program
command PIPE grep "something"
(PIPE Command should pe replaced by vertical line... not able to publish PIPE command through blogspot)
# Date formatting... Grab the date from the system and format it, to a YYYYMMDD format
filename=`date +'%Y%m%d'`
# Scan a file in shell script
for VALUE in `cat value.dat`
do
echo "Value in file: " $VALUE
done
# Backspace key's settings... depends on emulator
$stty erase ^?
**************************************************************************
Wednesday, April 9, 2008
App Server Monitoring Script
we have two files here
1) param_list.txt -> list of app server domains
2) health.sh -> shell script that checks for the status of the app server domain
# Filename: param_list.txt
# Parameter List file
# Contains the list of environments
DOMAIN1
DOMAIN2
DOMAIN3
DOMAIN4
DOMAIN5
DOMAIN6
DOMAIN7
DOMAIN8
# Filename: health.sh
# Usage: ./health
# !/bin/sh
ENV_COUNTER=0
DATE=`date '+%Y%M%d_%H_%M_%S'`
OUTPUT_FILE='MONITOR_'$DATE
echo "*** Application Server Status as of `date`***" >> $OUTPUT_FILE
echo >> $OUTPUT_FILE
echo >> $OUTPUT_FILE
#while [ $ENV_COUNTER -le 9 ]
#do
for ENV in `cat param_list.txt`
do
TUXCONFIG=$PS_HOME/appserv/$ENV/PSTUXCFG; export TUXCONFIG
TUX_OUT_FILE=$ENV'_TUXOUT'
rm $TUX_OUT_FILE
echo pq | tmadmin -r > $TUX_OUT_FILE 2>&1
echo "*********************************************************" >> $OUTPUT_FILE
echo "*** Status Report for Application Server: $ENV ***" >> $OUTPUT_FILE
echo "**********************************************************" >> $OUTPUT_FILE
echo >> $OUTPUT_FILE
echo pq | tmadmin -r >> $OUTPUT_FILE 2>&1
#echo pclt | tmadmin -r >> $OUTPUT_FILE 2>&1
egrep "No bulletin board exists|ERROR" ${TUX_OUT_FILE} >/dev/null 2>&1
if test $? = 0
then
echo "App Server $ENV Status: DOWN"
echo >> $OUTPUT_FILE
echo "Application Server Status: DOWN" >> $OUTPUT_FILE
else
echo "App Server $ENV Status: UP"
echo >> $OUTPUT_FILE
echo "Application Server Status: UP" >> $OUTPUT_FILE
fi
echo "************************************************************" >> $OUTPUT_FILE
echo >> $OUTPUT_FILE
echo >> $OUTPUT_FILE
done
echo "*** End of Report ***" >> $OUTPUT_FILE
I am still working on it to add some more options like alerts, load, business etc... I will update it once done...
Comments are most welcome...
Cheers!!!
OCI - Attach Block Volume to Windows VM
Tip: Although creating and attaching Block Storage to a Windows VM is pretty straightforward (OCI documentation is pretty good for that), th...
-
PeopleSoft Compare Reports: The compare reports are critical tools for the Fit/Gap analysis and determining the effort to re-apply/re-d...
-
Download this document - ( .doc ) or ( .pdf ) Change Assistant Introduction Change Assistant (CA) was first released in PeopleTools 8.44. C...
-
Process group is crucial in securing the processes and jobs in the system. It is possible to restrict access to certain processes within Pe...