i am trying to get the heap value of tomcat for this i written small code and executed in remote server its working fine, but when i am executing the script from nagios server the details are wrong. can anybody help the below is my script.