Categories
Performance Testing

How to find RAM utilization for specific JAVA process at run time

How to find RAM utilization for specific JAVA process at run time when application is running with huge load?

1) Open terminal in your Linux server.

2) Set your JAVA_Home.

3) type as jconsole and Enter

4) You can see a new window opening with jconsole, select the process that you want to profile and click on connect

jconsole

 

5) This will show show all details included Heap memory,Non heap memory,No. of loaded classes,No. of Live threads

what is the advantage of using jconsole?

If you want to see the summary of resource utilization in the production server at run time, this is the right tool to use as it will not create much performance overhead on the server . 

 

Categories
Linux technews testing

Installing Java and Setting JAVA_HOME

For any applications built around java requires JAVA_HOME variable to be set, here is how to setup JAVA_HOME for both Linux/Unix and windows environment.

To Install the JDK Software and Set JAVA_HOME on a UNIX System

  1. Install the JDK software.
    1. Go to http://java.sun.com/javase/downloads/index.jsp.
    2. Select the appropriate JDK version and click Download.The JDK software is installed on your computer, for example, at /usr/jdk/jdk1.6.0_02. You can change this location.
  2. Set JAVA_HOME.
    • Korn and bash shells:
      export JAVA_HOME=jdk-install-dir
      export PATH=$JAVA_HOME/bin:$PATH
    • Bourne shell:
      JAVA_HOME=jdk-install-dir
      export JAVA_HOME
      PATH=$JAVA_HOME/bin:$PATH
      export PATH
    • C shell:
      setenv JAVA_HOME jdk-install-dir
      setenv PATH $JAVA_HOME/bin:$PATH
      export PATH=$JAVA_HOME/bin:$PATH

To Install the JDK Software and Set JAVA_HOME on a Windows System

 

  • Install the JDK software.
    1. Go to http://java.sun.com/javase/downloads/index.jsp.
    2. Select the appropriate JDK software and click Download.The JDK software is installed on your computer, for example, at C:Program FilesJavajdk1.7. You can move the JDK software to another location if desired.
  • Set JAVA_HOME:
    1. Right click My Computer and select Properties.
    2. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:Program FilesJavajdk1.7.

JAVA_windows