Skip Menu |

This queue is for tickets about the jmx4perl CPAN distribution.

Report information
The Basics
Id: 50649
Status: resolved
Priority: 0/
Queue: jmx4perl

People
Owner: roland [...] cpan.org
Requestors: Daniel.Schwager [...] dtnet.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: "Daniel Schwager" <Daniel.Schwager [...] dtnet.de>
Subject: output using --unit does not work correctly
Date: Mon, 19 Oct 2009 16:37:38 +0200
To: <bug-jmx4perl [...] rt.cpan.org>
From: "Daniel Schwager" <Daniel.Schwager [...] dtnet.de>
Hi, I call the following against an agent running on sun glassfish: check_jmx4perl --url http://localhost:8080/j4p \ --unit B \ --alias MEMORY_HEAP_USED \ --base MEMORY_HEAP_MAX \ --critical :80 and got CRITICAL - memory_used : Threshold '10000000' failed for value 950064336 | 'memory_used'=950064336;5000000;10000000 OK - [MEMORY_HEAP_USED] : In range 46.32% (906.07 MB / 1.91 MB) | '[MEMORY_HEAP_USED]'=950081208B;;:1641073868.8;0;2051342336 So, "(906.07 MB / 1.91 MB)" must be "(906.07 MB / 1.91 GB)" ... If I remove the --unit, the result is ok: OK - [MEMORY_HEAP_USED] : In range 50.98% (1045797064 / 2051342336) | '[MEMORY_HEAP_USED]'=1045797064;;:1641073868.8;0;2051342336 Viele Gruesse Daniel Schwager ------------------------------------------------------------------- DT Netsolution GmbH - Taläckerstr. 30 - D-70437 Stuttgart Geschäftsführer: Daniel Schwager, Stefan Hörz - HRB Stuttgart 19870 Tel: +49-711-849910-32, Fax: -932 - Mailto:daniel.schwager@dtnet.de
Hi Daniel, i will have a look at the issue. If I understand right, the only thing not working properly is the conversion of the performance data into the proper unit (MB instead of GB). Expect it to be fixed in the next 0.36 wich will get released rather soon. Show quoted text
> I call the following against an agent running on sun glassfish: > > check_jmx4perl --url http://localhost:8080/j4p \ > --unit B \ > --alias MEMORY_HEAP_USED \ > --base MEMORY_HEAP_MAX \ > --critical :80 > and got > > CRITICAL - memory_used : Threshold '10000000' failed for value > 950064336 | 'memory_used'=950064336;5000000;10000000 > OK - [MEMORY_HEAP_USED] : In range 46.32% (906.07 MB / 1.91 MB) | > '[MEMORY_HEAP_USED]'=950081208B;;:1641073868.8;0;2051342336
The first line with 'CRITICAL' is not related to the given command, or ? (I uses a custom label and absolute values, so I guess it just a copy&paste gotcha). ciao ... ..roland
Subject: RE: [rt.cpan.org #50649] output using --unit does not work correctly
Date: Mon, 19 Oct 2009 16:53:47 +0200
To: <bug-jmx4perl [...] rt.cpan.org>
From: "Daniel Schwager" <Daniel.Schwager [...] dtnet.de>
Hi Roland Show quoted text
> i will have a look at the issue. If I understand right, the only thing > not working properly is the conversion of the performance data into > the proper unit (MB instead of GB). Expect it to be fixed in the next 0.36 > wich will get released rather soon.
Yes - only the converion will not work Show quoted text
> > > > check_jmx4perl --url http://localhost:8080/j4p \ > > --unit B \
should be "MB" for the sample below - my copy/paste fault. Show quoted text
> The first line with 'CRITICAL' is not related to the given command, or ? (I uses > a custom label and absolute values, so I guess it just a copy&paste gotcha).
yeh (-: sorry ... again - real copy/paste: First: check_jmx4perl --url http://localhost:8080/j4p \ --alias MEMORY_HEAP_USED \ --base MEMORY_HEAP_MAX \ --critical :80 OK - [MEMORY_HEAP_USED] : In range 55.92% (1157658936 / 2070216704) | '[MEMORY_HEAP_USED]'=1157658936;;:1656173363.2;0;2070216704 ---> great - all ok Second: check_jmx4perl --url http://localhost:8080/j4p \ --unit=MB \ --alias MEMORY_HEAP_USED \ --base MEMORY_HEAP_MAX \ --critical :80 OK - [MEMORY_HEAP_USED] : In range 48.22% (957.83 TB / 1986.50 TB) | '[MEMORY_HEAP_USED]'=1004355784MB;;:1666396979.2;0;2082996224 --> hmm, looks not that good. Third: check_jmx4perl --url http://localhost:8080/j4p \ --unit=B \ --alias MEMORY_HEAP_USED \ --base MEMORY_HEAP_MAX \ --critical :80 OK - [MEMORY_HEAP_USED] : In range 27.68% (551.89 MB / 1.95 MB) | '[MEMORY_HEAP_USED]'=578696168B;;:1672583577.6;0;2090729472 --> looks also not good (-: regards Danny
Thanks for the clarification. However, please note that the unit you give with '--unit' is used for interpreting the absolute number resulting from the query. So, for memory related queries, 'B' is the right choice since MBean return the memory sizes in Bytes. So it doesn't make sense to use '--unit MB' for memory queries. The conversion in the performance data is done automatically to the largest unit possible. There seems to be a bug here, though given MBs where GBs should be printed.
Subject: RE: [rt.cpan.org #50649] output using --unit does not work correctly
Date: Mon, 19 Oct 2009 17:10:30 +0200
To: <bug-jmx4perl [...] rt.cpan.org>
From: "Daniel Schwager" <Daniel.Schwager [...] dtnet.de>
Show quoted text
> However, please note that the unit you give with '--unit' is used > for interpreting the absolute number resulting from the query. So, > for memory related queries, 'B' is the right choice since MBean return > the memory sizes in Bytes. So it doesn't make sense to use '--unit MB' for > memory queries. > > The conversion in the performance data is done automatically to the largest > unit possible. There seems to be a bug here, though given MBs where GBs should > be printed.
Thanks for this info. One question - is there a hint where i can download the j4p.war ? I google-search for it, because I can't find the link inside your perl-doc from cpan... Did you forget to link to the war-file ? Also search on my filesystem found it inside /root/.cpan/build/jmx4perl-0.35-WnKngo/agent/j4p.war - but I think this is not the preferred way (-: regards Danny
Show quoted text
> One question - is there a hint > where i can download the j4p.war ? > I google-search for it, because I > can't find the link inside your perl-doc from cpan... > Did you forget > to link to the war-file ? Also search on my filesystem found it > inside /root/.cpan/build/jmx4perl-0.35-WnKngo/agent/j4p.war - but I > think > this is not the preferred way (-:
Indeed, installing with cpan burries the agent deep down in its build directory. The easiest way for now to get to the agent is to download the tar archive directly from http://search.cpan.org/CPAN/authors/id/R/RO/ROLAND/jmx4perl-0.35.tar.gz (you get to this link via www.jmx4perl.org). I'm on the way preparing a dedicated web site for jmx4perl where you will find an extra download link for the agent only.
The --unit bug should be resolved in 0.40 and later. For the agent download, 
you can use our maven repository at http://labs.consol.de/maven/repository/org/jmx4perl/j4p/

I close this ticket. Please open a new ticket in case your issues shouldnt be fixed.