#!/bin/bash


a=`/bin/netstat -p -n | grep  ":3000*" | grep -w  $1  | grep java | cut -d 'D' -f 2 | cut -d '/' -f 1 | cut -d ' ' -f 2`
#echo $a
if [ "$a"  == "" ]
then
  #echo "returning 0"
  exit 0
else
  #echo "running ps www"
  exit `ps wwww $a | grep -cw WServer`
fi

