Halfway through the week I realised that I might have overreached myself just a little by promising to deliver the future and then most of the fun I had this week was still to come.
So, I'll postphone the future to next week and give you a short troubleshooting tip this week. For sometimes things go wrong. Networks can flap, disks can fail, processors can overheat. And then there's the OS, the JVM, ... Sometimes it is just amazing that anything works at all.
There is of course the Status tab in the HTTPBackend Fulcrum that has live graphs to study, but there is also the Requests and Threads page in the Developer tab.
Now this is a static page and I needed the information on just one specific thread at a more frequent interval. So I wrote a new tool :
<argument name="threadname" method="as-string">arg:threadname</argument>
Did I say write ? No code (after no sql it is now time for the new paradigm, no code) of course. The netkernel:/k resource provides the raw data and I filter that with xslt :
<xsl:param name="threadname" nk:class="java.lang.String" />
And that's it. Put in a small script ... for example like this :
curl http://localhost:1060/tools/kerneldetail/ConcurrentCacheCullThread >> /var/tmp/culler.out
And collect all the data you want with minimum system impact.
So, next week I will deliver the future as promised.