HI,
I have a problem with 'sar' command.
I am using the sar comman in script.when i execute the script manually using ./filenae, i am getting the desired output.
But when i put the script in cron job i am not getting the desired value.
Below is the script..
sar > $_LOCATION/sar.txt
_IDLETIME=`tail -2 $_LOCATION/sar.txt | head -1 | tr -s ' ' ' ' | cut -d ' ' -f8 | cut -d '.' -f1`;
echo "Hi $_IDLETIME"
if [ $_IDLETIME -ge 60 ]
echo $_IDLETIME
else
echo "XXXX"
fi
what might be the cause of this issue.
Thanks,
Ahamed.