A simple usecase (Java2DDemo) of jvmstat3.0 (jps / jstat / visualgc)

sponsored links
jvmstat 3.0 can monitor J2SE 5.0, J2SE 1.4.2 and J2SE 1.4.1 virtual machines,
jvmstat3.0 need JDK5.0 installed, for those cannot upgrade to JDK5.0, pls find the previous version in:
Reference [3]
Reference [4]
Actually you can find them in the jvmstat FAQ point 11.

1: Install and setup
For installation and setup problem pls refer to reference [1], the installation part.

2: Simple test
a) Test in local
For local test, here choose the Java2DDemo to demonstrate the usage of jps / jstat / visualgc

After the installation finished,
<1> Start the Java2DDemo swing java application
C: \> java-jar "C: \ Program Files \ Java \ jdk1.5.0_06 \ demo \ jfc \ Java2D \ Java2Demo.jar
<2> use jps to find the PID of the Java2DDemo, or you can find the PID in windows task manager.
C: \> jps
5964 Program
5596 Jps
there is always has the Jps process. here the 5964 is PID of the Java2DMemo java application
<3> get the GC status by jstat and pipeline to a file to PID 5964, with 1000ms intervals and 1000 times.
C: \> jstat-gcutil 5964 1000 1000>> c: \ gc.log
for the usage of jstat you can get help by jstat-help and jstat-options

<4> Visual monitor the GC with visualgc
C: \> visualgc 5964
You will see the UI ref <VisualGC PID output> below.

b) Test for remote

3: Problems
For any problems you can refers to [2] FAQ. Actually most of the problems can find the workaround there.

[1] http://java.sun.com/performance/jvmstat
[2] http://java.sun.com/performance/jvmstat/faq.html
[3] https: / / cds.sun.com / is-bin / INTERSHOP.enfinity / WFS / CDS-CDS_Developer-Site / en_US /-/ USD / ViewProductDetail-Start? ProductRef = JVMSTAT-1.0-GF @ CDS-CDS_Developer
[4] https: / / cds.sun.com / is-bin / INTERSHOP.enfinity / WFS / CDS-CDS_Developer-Site / en_US /-/ USD / ViewProductDetail-Start? ProductRef = JVMSTAT-2.0-GF @ CDS-CDS_Developer

VisualGC PID output:
A simple usecase (Java2DDemo) of jvmstat3.0 (jps / jstat / visualgc)

jstat-gcutil 5964 1000 10 output:
A simple usecase (Java2DDemo) of jvmstat3.0 (jps / jstat / visualgc)
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of A simple usecase (Java2DDemo) of jvmstat3.0 (jps / jstat / visualgc)

  • hibernate using c3p0 connection pooling

    Private http://www.lifevv.com/tenyo/doc/20070605102040991.html c3p0 for open source's JDBC connection pool, with the release hibernate. This article describes how to use the hibernate configuration in c3p0. c3p0 connection pool configuration is v ...

  • Oracle instant clent for ruby / rails on cygwin

    Environment: XP: oracle full client, ruby, rails, gem cygwin: ruby rails, gem (the version with the XP version) Needs: for cygwin is installed under the rails platform support oci Steps: <1> download oracle instant client ( Instant Client Pa

  • Hibernate configuration parameters hibernate.hbm2ddl.auto

    Hibernate in the configuration file: <properties> <property name="hibernate.hbm2ddl.auto" value="create" /> </ properties> Parameter Description: validate load hibernate, the authentication to create a database t ...

  • Process migration from tomcat to websphere changes

    Process migration from tomcat to websphere changes Because customers use the web application server software used by different what tomcat5, tomcat6, websphere5.1, websphere6.1, weblogic8, and so on, and the software used inconsistent standards, ibm's


    dsfdsa http://lindows.javaeye.com/admin/blogs/213348 Tomcat 6 with the connection pool data source configuration http://www.blogjava.net/ec2008/archive/2008/07/19/216063.html project: test Driver path: D: \ workspace \ test \ WebRoot \ WEB-INF \ lib ...

  • In the servlet use Bean

    According to Sun's definition, JavaBean is a reusable software components. In fact JavaBean is a Java class, through the package into a property and methods of treatment of a function or a business object, referred to as bean. Because JavaBean is ...

  • The EJB3 Persistence

    EJB3 persistence with Hibernate is very similar to the mechanism: Environment: Server: JBOSS5.0 Database: MySQL5.0 1. Set up a data source First of all, in jboss-5.0.0.GA \ server \ default \ deploy, the establishment of a database used to connect the dat

  • Servlet brief introduction

    Servlet brief introduction: Servlet is a small application server Are used to complete the B / S architecture, the client requests the response to treatment Platform independence, performance, able to run thread Servlet API for Servlet provides the s ...

  • Hibernate secondary cache

    Hibernate cache: 2-bit cache, also known as process-level cache or SessionFactory level cache, secondary cache can be shared by all of the session Cache configuration and the use of: Will echcache.xml (the document code in hibernate package directory ...

blog comments powered by Disqus
Recent Entries
Tag Cloud
Random Entries