tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shanti Suresh <sha...@umich.edu>
Subject Re: Tomcat HeapMemoryUsage MBean question
Date Thu, 06 Sep 2012 14:15:07 GMT
Hi Christopher,



On Wed, Sep 5, 2012 at 9:46 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Shanti,
>
> On 9/4/12 3:18 PM, Shanti Suresh wrote:
> > I would like to graph Tomcat's HeapMemoryUsage -> used mbean value
> > for trending.  I have installed Tomcat's manager application with a
> > user belonging only to the "manager-jmx" role.  I would like to use
> > curl to get the data.  I have a couple of questions:
> >
> > (1) I don't seem to be able to assign an empty password or
> > otherwise no password to a user in "tomcat-users.xml".  Or could
> > I?
>
> What did you try? What happened when you tried that?
>

I still get the basic authentication dialog box.  And typing an empty
password, gives me an Unauthorized exception.


>
> > (2) How do I get just the "used" value from the composite
> > HeapMemoryUsage mbean?  I guess I could subsequently search for
> > pattern "used=".  But just curious if I could get the value
> > directly.  None of the following queries worked:
> >
> https://localhost:8453/manager/jmxproxy?qry=java.lang:type=Memory/HeapMemoryUsage
> >
> >
>
> https://localhost:8453/manager/jmxproxy?qry=java.lang:type=Memory/HeapMemoryUsage:used
> >
> https://localhost:8453/manager/jmxproxy?qry=java.lang:type=Memory/HeapMemoryUsage.used
>
> The
> >
> exact question you are asking is answered in an example of the
> JMXProxy's "get" operation usage:
>
> http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#JMX_Get_command
>

Oh my!  Thank you!  I remember reading that a while back but just missed it
when in need.  However, the syntax didn't produce the desired results.

"
https://hostname_fqdn:8453/manager/jmxproxy/?get=java.lang:type=Memory&att=HeapMemoryUsage&key=used"
  ==> gives me the composite result back:

OK - Attribute get 'java.lang:type=Memory' - HeapMemoryUsage=
javax.management.openmbean.CompositeDataSupport(compositeType=javax.management.openmbean.CompositeType(name=java.lang.management.MemoryUsage,items=((itemName=committed,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)),(itemName=init,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)),(itemName=max,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)),(itemName=used,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)))),contents={committed=422940672,
init=0, max=3087007744, used=116903640})


I will try some more.  But I may be doing something wrong, perhaps?

Thanks.

                        -Shanti


> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iEYEARECAAYFAlBHV6EACgkQ9CaO5/Lv0PBvawCfS0UPId5r3QHubKNI81p+0Uo9
> oigAnA6SZdrc7uli5looMShWeHv1NuoH
> =TdSs
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message