I am running this Sam script in Solarwinds it works if I run it on the server but not in SAM
Script Arguments:
bash ${SCRIPT}
script body:
bin/sh
port=62019
pid=$(ps --no-headers -eo pid,args | grep activemq | grep port=${port} | awk '{print $1}')
if [ "$pid" != "" ]; then
rss=$(ps --no-headers -o rss -p $pid)
# echo "Message.1: Total amount of memory in kB: $rss"
echo "Statistic.1: $rss"
fi
Looks like all should work. What is could be wrong with the output formatting?