[wildfly-dev] Gathering diagnostic data

James Livingston jlivings at redhat.com
Tue Feb 25 23:38:23 EST 2014


On Tue, 2014-02-25 at 22:11 -0600, Brian Stansberry wrote:
> On 2/25/14, 9:30 PM, David M. Lloyd wrote:
> > On 02/25/2014 09:26 PM, James Livingston wrote:
> >> Is this something that might be possible or a good idea to do? I have
> >> some ideas about other things that may be useful, like per-thread CPU
> >> usage which RH support currently uses a pile of shell scripts for, but
> >> starting with one thing may be simpler.
> >
> > I believe that the management model that is already defined for host
> > controllers' views of their servers could easily accommodate this kind
> > of thing.  I don't think it'd have to be an extension - in fact, it
> > probably should not be in this case.
> >
>
> Agreed.

Thanks David and Brian. I'll take a look at adding it there, using my
in-progress code to abstract over the JDK/OS specific details of
grabbing the data. I've created
https://issues.jboss.org/browse/WFLY-3025 for it.


The most common mechanism for getting a thread dump is on the
Hotspot-specific implementation of the Attach API, which (unfortunately)
returns a blob of text. Parsing it isn't too hard, but it isn't
standardised and newer JDK releases may emit it in a slightly different
form.

Would it be best to just return the dump as a giant string, or attempt
to returning it as a well structured model, with a fallback if parsing
fails. The latter would be better for tools, such as if the console ever
wanted to do anything with the information, but we have to deal failures
to parse the data.

-- 
James "Doc" Livingston
JBoss Support Engineering Group



More information about the wildfly-dev mailing list