Create a cron job
0 5 * * * /path/filename.sh
which can run the following script
source ~/.bash_profile
processId=$(ps -ef | grep ‘agileDomain’ | grep -v ‘grep’ | awk ‘{ printf $2 }’)
jmap -histo:live $processId
echo $processId” “$(date) >> /tmp/t2.txt
Since my environment is running Agile 9.3.1.1 which requires not later than java 1.6 we are making use of jmap, if the java version is 1.7 or laterjcmd <process-id> GC.run