#!/bin/sh
#******************************************************************************
#                       ISTP LZPR SOFTWARE
#               Property of the U.S. Government
#                       NASA/GSFC/Code 560
#******************************************************************************
#
# UNIT NAME: pspdp
#
# PURPOSE: To display active ISTP LZP processes
#
# INVOCATION METHOD: pspdp [username]
#
# CHANGE HISTORY:
# Author        Change ID  Build/Release   Date      Description of Change
# ------        ---------  ------------- ---------   ---------------------
# R. Wiechert   ISTP       R1.2          04/22/98    Enhancement of PacorII code
#
# NOTES:
#
# To avoid visual clutter, output occurs in two phases:
# 1) Processes with long command line argument lists
# 2) Processes with short command line argument lists
# This separates the verbose 1st phase from the 2nd phase
# and provides for more readable output.
#
#******************************************************************************
if [ $# -gt 1 ]
then
   printf "\nUsage:  pspdp [username]\n\n"
   exit 9
elif [ $# = 1 ]
then
   username="$1"
else
   username=`/usr/ucb/whoami`
fi
echo "$username processes `date`"
/usr/5bin/ps -eo "user pid ppid time args" | egrep "$username |TIME" \
 | egrep " TIME |lzp_|sw_sync|labview|dps_main" \
 | egrep -v "grep" | sort
/usr/5bin/ps -eo "user pid ppid time comm" | egrep "$username " \
 | egrep "PSC|CAS|CSD|PAS|PPA|CGS|CGP|PEP|PEI|PER|RM|TAP|PTT|IDF|sqlplus" \
 | egrep -v "grep" | sort
exit 0
