This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

using jvmstat from cygwin

Hi there,

I wonder if I'm the only one who uses jvmstat from cygwin, but anyway, here is a recipe for using the jvmstat-package from cygwin:

The culprit with not being able to run the standard installed jvmstat-tools on cygwin is the difference between the cygwin-paths and the windows-paths. One is able to avoid this if cygwin, jvmstat and java are all installed into the SystemDrive and are fitted to use the same paths. Here I describe how my Installation was made to work.

Java (1.5.0 and 1.4.2_05) are on C:\Programme\Java
jvmstat_home is C:\opt\jvmstat and C:\opt\jvmstat-3.0
my jvmstat is version 1.1 for Java 1.4.2. I wasn't able to make the jvmstat 1.1 perfagent and 3.0 (or Java 1.5) interact, so I have them both...

/opt is a directory used by some nonstandard cygwin-apps as bind or agrep, so I was not able to mount the whole C:\opt...
mkdir -p /opt/jvmstat ; mkdir -p /opt/jvmstat-3.0
mount -sb 'C:\opt\jvmstat' /opt/jvmstat
mount -sb 'C:\opt\jvmstat-3.0' /opt/jvmstat-3.0

/Programme is not used by any cygwin-app, so I figured the easiest method is to mount the whole thing
mkdir -p "/Programme"                    # Your path may be "/Program Files" ...
mount -sb 'C:\Programme' '/Programme'

On linux/solaris Java usually resides on /usr/lib/java, so why not do this here too!?
ln -s "/Programme/Java/jdk1.5.0 /usr/lib/java

Now prepare the PATH. This method is not the smartest one, but it works. (Actually I use to set the PATH in /etc/profile.d/ ...)
export PATH=${PATH/:\/usr\/local\/bin:/:/usr/local/bin:/usr/lib/java/bin:/opt/jvmstat/bin:} # Or wherever You want it within Your PATH ... and put it into Your ~/.profile

Another pitfall to avoid is the temp-directory, which can differ between cygwin and Windows.
This is needed, if You want to watch JVMs running on this PC...
mount -sb 'C:\Temp' /tmp
export TEMP=/tmp
export TMP=/tmp
# Don't forget to set the Windows Environment too (in ... Systemsteuerung => System aka Control Panel ...)

And now everything else works according to the jvmstat-documentation for unix 


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]