The feature works as designed. The following FAQ was requested to be
added to the jvmstat CoolStuff website on 3/23/04 and should be available
soon at http://developers.sun.com/dev/coolstuff/jvmstat/faq.html
Q: I'm running on Windows and I've installed J2SE 1.4.2 and jvmstat
2.0, but when I run jvmps it does not display any java processes.
I can run 'visualgc 0' and it will work, but I cannot get visualgc
or any other jvmstat tool to monitor other Java processes.
A: The problem is most likely that your default Windows temporary
directory is on a FAT type file system. For security reasons,
the shared memory exported by the HotSpot JVM is disabled whenever
the JVM encounters a FAT type file system (more precisely, any
file system that does not support persistent access control lists)
as such file systems provide insufficient access controls.
There are two potential work-arounds for this issue:
1) Set the TMP environment variable to refer to a directory
on an NTFS file system, or any file system that supports
persistent access control lists. Note that this file system
should be local to the machine. Setting this option for
target applications is application specific. To set this
variable in a command prompt or in a batch script, simply
enter the following:
The environment variable can be set globally by adding it
to the list of environment variables in the System Properties
(Control Panel->System, select the "Advanced" tab and click
on the "Environment Variables" button). Through this interface,
you can choose to set the variable for all processes run by
the current user or globally as a system variable for all
processes run by the system.
The TMP variable must refer to the same location for both
the monitored applications and the jvmstat tools.
2) Changing the TMP environment variable to refer to an NTFS
type file system is not always a viable option. For these
cases, the HotSpot JVM provides a mechanism to bypass the
the file system type check. However, using this mechanism
instructs the HotSpot JVM to create the jvmstat shared memory
without any access controls, allowing access to the instrumentation
exported by the JVM to any user on the system.
To bypass the file system type check, set the -XX:+PerfBypassFileSystemCheck option
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:
The feature works as designed. At the request of the security team,
the shared memory backing store files is not created on Windows if
th files system type for the temporary directory (as determined by
the windows GetTempPath() API) does not support Persistent Access
Control List. FAT type file systems do not support PACLs and NTFS
file systems do. Without Persistent Access Controls, the backing
store file would be readable by any user on the system.