Date Created: Wed 02-Jan-2008

Related Document Categories:

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/


#!/bin/ksh
# Korn Shell Functions file
#
# Author: Steve Robinson / Koushik Ghosh
# Date Created: November 2007
# Arguments: subfolder for enviroment
# Decription: This script lists all the was process to mkae it easy to kill tasks in am emergency.
# Version: 1.1
# History:
# 23-November-2007 - Created.
# 01-January-2008 - Updated to trim spaces
#############################################################################################################
Script=`basename $0|awk ' BEGIN { FS="."} { print $1 } '`
if [ $# != 1 ]; then
echo "Correct Usage: ${Script} {ENVIRONMENT (like: dev, inst01, inst02 or inst03}"
fi

ENVIRONMENT=$1
ENVPATH=/apps/was/ws6/$ENVIRONMENT
if [ -d $ENVPATH ]; then
total=`ps -ef | grep /apps/was/ws6/$ENVIRONMENT |tr -s " "| cut -d " " -f3`
echo ""
for i in $total
do
val=`pargs $i 2>/dev/null|cut -d":" -f2-10|grep -i [a-z0-9]|tail -1`
pid=`echo PID [$i]`
server=`echo SERVER [$val ]`
FORMAT="%-8s%-10s%-10s%-12s\n"

if [[ $val != "" ]] ; then
##echo $pid $server
printf $FORMAT PID $i SERVER $val
fi
done
else
echo "ERROR: no environment is available under $ENVPATH"
fi
echo ""

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many leading brands around the world. Steve specialises in JEE, DevOps and Thought Leadership.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


  • Linked In
  • Twitter
  • About Me
  • Contact Me

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

Courses

  • WebSphere Courses

Articles

WebSphere Categories

Other Categories