Communities
|
Social Applications
Networks
Support
|
|
C-Level Executives
Other Roles
|
|
Support
Education
Partner
Other Tasks
|
|
| |
Could not attach to
vmid:
reason
-XX:+UsePerfData
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode)
#
# Error ID: 504552460E435050011E
#
set TMP=
path
-XX:+PerfBypassFileSystemCheck on the java command line for both the applications you want to monitor and for the jvmstat tools. Setting this option for target applications is application specific. For the jvmstat tools, the following environment variable can be set before running any of the commands:
set VMARGS=-XX:+PerfBypassFileSystemCheck
jps -J-XX:+PerfBypassFileSystemCheck
-name <names>jstat -options
C:\>visualgc -version
A J2SE 5.0 or later JDK is required to run this tool.
The java version found in the PATH is:
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
visualgc.cmdjps.exejps.exe
c:\> set JVMSTAT_JAVA_HOME=c:\java
Make sure that this directory contains the
lib\tools.jar file, as that is ultimately what the script is looking for.
c:\java\bin directory comes before the windows directory
c:\winnt\system32. However, this change may affect other applications, so the first option is probably a better choice.
sun.tools.jstatd.Jstatd and it's in the tools.jar file in
$JAVA_HOME/lib/tools.jar. It will be necessary to remove the "-J" prefix to any arguments that are passed to
jstatd.
jps localhost
jstat -gcutil <vmid>@localhost 1s
jstatdsetuid()H:\>visualgc 1076 Exception in thread "main" java.lang.NoClassDefFoundError: sun/jvmstat/monitor/MonitorException
visualgc.cmd script to
visualgc.bak.
visualgc.cmd substituting the Windows shortened directory name for the locations of the JDK and jvmstat.
c:\Program Files\java\jdk1.5.0_2 then use
c:\PROGRA~1\java\jdk1.5.0_2 instead.
c:\Program Files\jvmstat then use
c:\PROGRA~1\jvmstat instead.
visualgc.cmd would then contain the following:
c:\PROGRA~1\java\jdk1.5.0_2\bin\java -Xbootclasspath/p:c:\PROGRA~1\java\jdk1.5.0_2\lib\tools.jar -jar c:\PROGRA~1\jvmstat\jars\visualgc.jar %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
Exception in thread "main" java.lang.NullPointerException
at com.sun.jvmstat.tools.visualgc.MonitoredVmModel.getNativeCompileTime(MonitoredVmModel.java:459)
at com.sun.jvmstat.tools.visualgc.GCSample.<init>(GCSample.java:185)
at com.sun.jvmstat.tools.visualgc.VisualGC.main(VisualGC.java:128)
visualgc -version
Version 3.0_b04 10/12/04 - Requires J2SE/Hotspot 1.5.0 or later
Version 3.0_b07 12/10/06 - Requires Sun Java SE 5.0 or later with the HotSpot JVM
upgrade to b07
