$ more pids
#!/usr/bin/bash
#NODENAME=`hostname`
NODENAME=xxxxxxx
CELLPATH1=`ls -d /app/IBM/Profiles/appserver01/config/cells/cel*`
SERVERSPATH1="${CELLPATH1}/nodes/${NODENAME}/servers"
DMGRHOME1="/app/IBM/Profiles/dmgr01"
LOGHOME1="/logs"
echo ""
echo "INFO: PIDS for Deployment Manager and/or Application Servers"
echo "-------------------------------------------------------------"
if [ -d ${DMGRHOME1} ]
then
if [ -f ${LOGHOME1}/dmgr/dmgr.pid ]
then
echo "Deployment Manager1 : " `cat ${LOGHOME1}/dmgr/dmgr.pid`
else
echo "Deployment Manager1 : DOWN"
echo ""
fi
else
echo "Deployment Manager1 : Not Present"
echo ""
fi
echo "INFO: Listing all other server instances in the following directory ..."
echo " ${SERVERSPATH1} "
echo ""
for i in `ls ${SERVERSPATH1}`
do
if [ -f ${LOGHOME1}/$i/$i.pid ]
then
process_id=`cat ${LOGHOME1}/$i/$i.pid`
process_count=`ps -ef | grep -w $process_id| grep -vc grep`
if [ $process_count -eq 0 ]
then
echo $i " : " DOWN
else
echo $i " : " `cat ${LOGHOME1}/$i/$i.pid`
fi
else
echo $i " : " DOWN
fi
done
echo "-------------------------------------------------------------"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment