Hi All,
I am new to Scripting , please give me guidance to write the script to see top processes on the Linux operating system.
I executed this script on my Virtual Server(Linux)
DATE=`date +%Y%m%d%H%M%S`
HOME=/home/xmp/testing/xmp_report
RADIUS_PID=`xms -xmp sh pr | grep "RADIUS.iamsp02ldv" |awk '{ print $3 }'`
PSE_PID=`xms -xmp sh pr | grep "PRESENCE-STORE.iamsp02ldv" |awk '{ print $4 }'`
printf "\n\n############## Process Info. #############\n\n" >> $HOME.$DATE
top -b -p $RADIUS_PID -n 1 >> $HOME.$DATE
printf "\n\n############## CPU Info. PSE #############\n\n" >> $HOME.$DATE
top -b -p $PSE_PID -n 1 >> $HOME.$DATE
exit 0
i am getting out put like below
test: line 5: xms: command not found
test: line 6: xms: command not found
top: bad pid '-n'
top: bad pid '-n'
please any one help me on this
Thanks in advance
Venkat