From nobody@FreeBSD.org  Sat Dec 15 22:52:20 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6B80516A417
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Dec 2007 22:52:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 64D4113C457
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Dec 2007 22:52:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lBFMq7SU073077
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Dec 2007 22:52:07 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lBFMq7oH073075;
	Sat, 15 Dec 2007 22:52:07 GMT
	(envelope-from nobody)
Message-Id: <200712152252.lBFMq7oH073075@www.freebsd.org>
Date: Sat, 15 Dec 2007 22:52:07 GMT
From: Kees Jan Koster <kjkoster@kjkoster.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Java 1.5: JMX OperatingSystem mbean yields wrong results
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118735
>Category:       java
>Synopsis:       Java 1.5: JMX OperatingSystem mbean yields wrong results
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    glewis
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 15 23:00:06 UTC 2007
>Closed-Date:    Fri Feb 29 06:12:28 UTC 2008
>Last-Modified:  Fri Feb 29 06:12:28 UTC 2008
>Originator:     Kees Jan Koster
>Release:        6.3-PRERELEASE
>Organization:
>Environment:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-p4-kjkoster_15_may_2007_13_43)
Java HotSpot(TM) Client VM (build 1.5.0-p4-kjkoster_15_may_2007_13_43, mixed mode)


>Description:
The OperatingSystem mbean returns no useful results for the attributes that I tested, which were: TotalSwapSpaceSize, FreeSwapSpaceSize, OpenFileDescriptorCount, FreePhysicalMemorySize, CommittedVirtualMemorySize, MaxFileDescriptorCount, TotalPhysicalMemorySize.

These values are either seemingly random, or fixed at some unless value.
>How-To-Repeat:
Start a Java program using FreeBSD's 1.5 Java port. On the command line, enable JMX using the options: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false". Then use jconsole to attach to this process and view the mbean identified by java.lang:type=OperatingSystem.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-java->glewis 
Responsible-Changed-By: glewis 
Responsible-Changed-When: Sun Dec 16 16:04:18 UTC 2007 
Responsible-Changed-Why:  
I'll take a look at this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118735 
State-Changed-From-To: analyzed->open 
State-Changed-By: glewis 
State-Changed-When: Sun Dec 16 19:46:53 UTC 2007 
State-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=118735 

From: Greg Lewis <glewis@eyesbeyond.com>
To: Kees Jan Koster <kjkoster@kjkoster.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: java/118735: Java 1.5: JMX OperatingSystem mbean yields wrong results
Date: Sun, 16 Dec 2007 12:50:22 -0800

 On Sat, Dec 15, 2007 at 10:52:07PM +0000, Kees Jan Koster wrote:
 > The OperatingSystem mbean returns no useful results for the attributes that I tested, which were: TotalSwapSpaceSize, FreeSwapSpaceSize, OpenFileDescriptorCount, FreePhysicalMemorySize, CommittedVirtualMemorySize, MaxFileDescriptorCount, TotalPhysicalMemorySize.
 > 
 > These values are either seemingly random, or fixed at some unless value.
 
 Take a look at 
 
 j2se/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c
 
 and you'll see this isn't totally unexpected.  Some of these should be
 available though.
 
 -- 
 Greg Lewis                          Email   : glewis@eyesbeyond.com
 Eyes Beyond                         Web     : http://www.eyesbeyond.com
 Information Technology              FreeBSD : glewis@FreeBSD.org

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: java/118735: commit references a PR
Date: Tue,  1 Jan 2008 16:49:16 +0000 (UTC)

 glewis      2008-01-01 16:49:11 UTC
 
   FreeBSD ports repository
 
   Modified files:
     java/jdk15           Makefile 
   Added files:
     java/jdk15/files     
                          patch-j2se::management::UnixOperatingSystem_md.c 
   Log:
   . Implement or fix more of the OS specific statistics gathering functions.
     This allows jconsole to show valid statistics for the following
     OperatingSystem MBean statistics (some of these statistics are also shown
     in the Summary and VM tab of jconsole):
   
     TotalSwapSpaceSize, FreeSwapSpaceSize, FreePhysicalMemorySize and
     TotalPhysicalMemorySize.
   
     Note that MaxFileDescriptorCount has always been correct as far as I
     can tell.
   . Also, implement the function for ProcessCpuTime using a non-deprecated
     function (getrusage(2) rather than times(3)).
   
     These changes are restricted to 6.x and higher and have only been tested
     on 6.x (where they appear to work correctly).  The changes are not valid
     for 4.x.  Their validity on 5.x and 7.x is unknown (testing welcome).
   
     The PR is not fully addressed by these changes since
     CommittedVirtualMemorySize and OpenFileDescriptorCount remain bogus.
     Suggestions on how to get these without using kvm(3) would be appreciated.
   
   PR:             118735
   
   Revision  Changes    Path
   1.141     +1 -1      ports/java/jdk15/Makefile
   1.3       +121 -0    ports/java/jdk15/files/patch-j2se::management::UnixOperatingSystem_md.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: Greg Lewis <glewis@eyesbeyond.com>
To: Kees Jan Koster <kjkoster@kjkoster.org>
Cc: freebsd-gnats-submit@freebsd.org, freebsd-java@freebsd.org
Subject: Re: java/118735: Java 1.5: JMX OperatingSystem mbean yields wrong results
Date: Tue, 1 Jan 2008 08:51:48 -0800

 On Sat, Dec 15, 2007 at 10:52:07PM +0000, Kees Jan Koster wrote:
 > The OperatingSystem mbean returns no useful results for the
 > attributes that I tested, which were: TotalSwapSpaceSize,
 > FreeSwapSpaceSize, OpenFileDescriptorCount, FreePhysicalMemorySize,
 > CommittedVirtualMemorySize, MaxFileDescriptorCount,
 > TotalPhysicalMemorySize.
 > 
 > These values are either seemingly random, or fixed at some unless value.
 
 I've committed a fix that implements TotalSwapSpaceSize, FreeSwapSpaceSize,
 FreePhysicalMemorySize and fixes TotalPhysicalMemorySize.
 MaxFileDescriptorCount has always been right as far as I can tell.
 
 Not quite sure how to get OpenFileDescriptorCount without using kvm(3)
 yet.  Not sure what they mean by CommittedVirtualMemorySize yet.
 
 -- 
 Greg Lewis                          Email   : glewis@eyesbeyond.com
 Eyes Beyond                         Web     : http://www.eyesbeyond.com
 Information Technology              FreeBSD : glewis@FreeBSD.org

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: java/118735: commit references a PR
Date: Sat, 12 Jan 2008 23:25:02 +0000 (UTC)

 glewis      2008-01-12 23:24:57 UTC
 
   FreeBSD ports repository
 
   Modified files:
     java/jdk15/files     
                          patch-j2se::management::UnixOperatingSystem_md.c 
   Log:
   . Implement OpenFileDescriptorCount for BSD.  This requires fdescfs.
   
   PR:             118735
   
   Revision  Changes    Path
   1.4       +55 -3     ports/java/jdk15/files/patch-j2se::management::UnixOperatingSystem_md.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Fri Feb 29 02:09:04 UTC 2008 
State-Changed-Why:  
glewis: there appear to be commits in the Audit-Trail.  Can this one 
be closed now? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118735 
State-Changed-From-To: feedback->closed 
State-Changed-By: glewis 
State-Changed-When: Fri Feb 29 06:11:16 UTC 2008 
State-Changed-Why:  
Oops, forgot to close this after the last two 1.5 and 1.6 patchset updates 
which should cover this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118735 
>Unformatted:
