delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/15/14:54:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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
Subject: using jvmstat from cygwin
Date: Wed, 15 Dec 2004 20:54:20 +0100
Message-ID: <D7FBE8A336018A4EB5EBDC6C898821930991CA01@HUELVA.belgium.fhm.de>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Morche Matthias" <Matthias DOT Morche AT P7S1Produktion DOT de>
To: "Cygwin Mailinglist \(E-Mail\)" <cygwin AT cygwin DOT com>
X-OriginalArrivalTime: 15 Dec 2004 19:54:21.0130 (UTC) FILETIME=[DE796AA0:01C4E2DF]
X-IsSubscribed: yes
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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019