Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: using jvmstat from cygwin Date: Wed, 15 Dec 2004 20:54:20 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Morche Matthias" To: "Cygwin Mailinglist \(E-Mail\)" X-OriginalArrivalTime: 15 Dec 2004 19:54:21.0130 (UTC) FILETIME=[DE796AA0:01C4E2DF] X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id iBFJsd4V006092 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/env.sh ...) 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 ...) TMP=%Systemdrive%\Temp TEMP=%SystemDrive%\Temp And now everything else works according to the jvmstat-documentation for unix http://developers.sun.com/dev/coolstuff/jvmstat/docs.html. matthias -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/