To install jvmstat on linux follow the below instructions;
1. Create a directory where you want to install jvmstat
2. Download jvmstat from http://developers.sun.com/dev/coolstuff/jvmstat/
3. Unzip the distribution to the directory you created in the first step.
4. Change your PATH settings as follows; PATH=$PATH:/path_to_your_unziped_distribution/bin
5. Set the environment variable: export JVMSTAT_JAVA_HOME=/your_jdk_installation_path
6. Create a policy file called jstatd.policy with the following entry:
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
Thats about it. And your ready to use jvmstat. Just type "jps" and you will get a list of java applications running on your machine. Then just use that id and type "visualgc PID" to run visualgc which will give you an overview of memory allocations on the heap by your application.
More info on how to do remote monitoring can be found in the below link;
http://java.sun.com/performance/jvmstat/solaris.html
1. Create a directory where you want to install jvmstat
2. Download jvmstat from http://developers.sun.com/dev/coolstuff/jvmstat/
3. Unzip the distribution to the directory you created in the first step.
4. Change your PATH settings as follows; PATH=$PATH:/path_to_your_unziped_distribution/bin
5. Set the environment variable: export JVMSTAT_JAVA_HOME=/your_jdk_installation_path
6. Create a policy file called jstatd.policy with the following entry:
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
Thats about it. And your ready to use jvmstat. Just type "jps" and you will get a list of java applications running on your machine. Then just use that id and type "visualgc PID" to run visualgc which will give you an overview of memory allocations on the heap by your application.
More info on how to do remote monitoring can be found in the below link;
http://java.sun.com/performance/jvmstat/solaris.html