Date Created: Tue 27-Nov-2007

Related Document Categories:


    #!/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.
    # 23-November-2007 - Added Comments
    #
    #############################################################################################################
    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 | cut -d " " -f4`
    echo ""
    for i in $total
    do
    val=`pargs $i|cut -d":" -f2-10|grep -i [a-z0-9]|tail -1`
    pid=`echo PID [$i]`
    server=`echo SERVER [$val ]`
    echo "$pid $server"
    done
    else
    echo "ERROR: no environment is available under $ENVPATH"
    fi
    echo ""

Middleware Mentor - Steven Charles Robinson

About Me

Steve Robinson has been working in IT for over 15 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware consulting. Steve comes from both an administration and development background.

Before moving to JEE, Steve was an accomplished developer and consultant for both IBM Lotus Notes and Microsoft .NET Technologies.

Follow Steve as @stevencrobinson on twitter.

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

WebSphere Categories

Oracle WebLogic Categories

JBoss Categories

Other Categories