/dev/null. If
you redirect the screen output, it is easier to run spdsperf in the
background, or as an orphan.
spdsperf -g SMID -n NSP -s SNP -p PLP -l LOG [-i SEC] [-c CNT]
ps —eo args | grep spdsbase.
The shared memory ID should be the first parameter (after the process
name) that is passed to the process.
.../samples/perfmon/rc.perf.
You can use either example file to create a custom rc.perf script.
#!/bin/ksh
#--------------------------------------------------------------------------
#
# PURPOSE: Start the SPD Performance Profiler for the specified servers.
#
# PARAMETERS: version - Version of SPDS to build and run (e.g., dev, 403).
#
# NOTES: Common optional parameters:
# -nsport overrides NSPORT for server.
# -snport overrides SNPORT for server.
# -debug use alternate port numbers for development.
#
# The default repetition count for spdsperf is 3. This script
# over-rides the default to run indefinitely. Supplying a -c
# option to this script will over-ride this new default.
#
# HISTORY: 12Sep06 mjm Optimized for customer use.
# 02Aug06 mjm Created.
#
#--------------------------------------------------------------------------
#
# enable XPG4 versions of ps command on some platforms
#
export UNIX95=1
#
# initialize variables
#
NSPORT=6100
SNPORT=6101
DEBUG=
PARGS="-c 0"
#
# parse parameters
#
while [ $1 ]; do
#echo "Parsing Option $1 of length ${#1}"
case "$1" in
-nsport) if [ $# -lt 2 ]; then
echo "$1 parameter value not specified"
exit 1
fi
NSPORT=$2
shift;;
-snport) if [ $# -lt 2 ]; then
echo "$1 parameter value not specified"
exit 2
fi
SNPORT=$2
shift;;
-debug) DEBUG="YES";;
-trace) echo "********\n* Script: $0\n* Args: $*\n********"
set -x
trace="-trace"
echo "Script tracing turned on";;
*) echo "Found unknown arg, passing on to profiler."
PARGS="$PARGS $1";;
esac
shift
done
echo "NSPORT=$NSPORT"
echo "SNPORT=$SNPORT"
echo "DEBUG=$DEBUG"
echo "PARGS=$PARGS"
#
# Check for debug option
#
if [ -n "$DEBUG" ]; then
NSPORT=9876
SNPORT=9877
echo "Using Debug Ports: NS=$NSPORT SN=$SNPORT"
fi
SSRVPID=$(ps -eo pid,ppid,args | grep spdsserv | grep 6100
| tr -s " " " " | sed -e "s/^ *//" | cut -d " " -f1)
SNETPID=$(ps -eo pid,ppid,args | grep spdssnet | grep 6101
| tr -s " " " " | sed -e "s/^ *//" | cut -d " " -f1)
SHMATID=$(ps -eo pid,ppid,args | grep spdsbase | grep $SSRVPID
| tr -s "\t" " " | sed -ne "1s/^ *//p" | cut -d " " -f4)
echo "SPDSNSRV Pid: $SSRVPID"
echo "SPDSSNET Pid: $SNETPID"
echo "SHMATID: $SHMATID"
INSTDIR=/usr/local/spds
PATH=$INSTDIR/bin
export PATH
LD_LIBRARY_PATH=$INSTDIR/bin
export LD_LIBRARY_PATH
LIBPATH=$INSTDIR/bin
export LIBPATH
# substitute user's display machine name below.
export DISPLAY=machine:0.0
#sleep 4
spdsperf -g $SHMATID -n $SSRVPID -s $SNETPID $PARGS