Re: Can I find out what webapps resin is running?

"Bill Au" <[email protected]> Thu, 22 Jun 2006 08:01:31 -0400
Newsgroups gmane.text.xml.resin.user
Message-ID <[email protected]>
------=_Part_2738_5321775.1150977691958
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

If you are using Java 5, take a look at the MXBeans under
java.lang.management.
That's what JConsole and Scottit use behind the screen.  They are very
simple
to use.  You will find sample code under demo/management in your JDK install
directory.

Bill

On 6/21/06, Jay Ballinger <[email protected]> wrote:
>
> One of our developers, who apparently doesn't have enough work to do,
> borrowed the thread dump code from Scottit and added it to the
> ResinStatusServlet with very little effort. Makes for a nice combo. ;)
>
>
>
> On 6/20/06, Bill Au <[email protected]> wrote:
> > Threads count, sessions count, memory usage, db pools are all covered
> >  by ResinStatusServlet.  In addition, it also shows the invocation and
> proxy
> > cacahe
> >  hit ratio.  We have software in place to monitor threads count and
> memory
> > usage
> >  over HTTP.  We are also logging gc info to file.  I would have been
> nice if
> > we can
> >  monitor gc over HTTP too.  Too bad that Scottit is reporting inaccurate
> > data for gc.
> >
> >  Yes, jconsole is very nice but it requires that jmxremote to be
> enabled.
> >  We don't want to pay that overhead in production.  Can't want for Java
> 6
> > where
> >  jconsole can connect on-demand.
> >
> >  Yes, the thread dump is about the only thing that Scottit provides that
> I
> > can't get
> >  from ResinStatusServlet.  We already have ways to do that before we
> learn
> > about
> >  Scottit.  So we had decided not to install another webapp (Scottit)
> just
> > for showing
> >  the thread dump.
> >
> >  Bill
> >
> >
> > On 6/20/06, Keith Fetterman <[email protected]> wrote:
> > > Hi Bill,
> > >
> > > Sorry it took me so long to respond.
> > >
> > > Bill Au wrote:
> > > > What useful information are you getting out of Scottit 3.1 that is
> not
> > > > available in ResinStatusServlet?
> > >
> > > We were experiencing a slow down with our Web site, and yet I couldn't
> > > find any reason for it.  All of the physical resources, like server
> CPU
> > > performance, network performance, memory consumption, database
> > > connections, etc. did not show a problem.  When I ran Scottit 3.1, I
> > > found the problem.  The critical information was this:  active
> sessions
> > > and active threads.  Before Scottit, I had no way to see the active
> > > sessions and threads in production in real time.  My problem ended up
> > > being the max-threads were way too low.  I quadrupled the limit and
> > > solved my problem.
> > >
> > > There is also tons of other useful stuff.  I can see a thread dump in
> > > real time without having to perform a special command, sending an
> > > interrupt to the server.
> > >
> > > I can see the total memory and with a Java applet I can watch the
> > > garbage collections.  But, If you really want to see the whole memory
> > > picture, I recommend using jconsole instead.
> > >
> > > Since I was having memory problems about 6 months ago, I currently log
> > > all GCs to a file so I can monitor it on a daily basis.
> > >
> > > I can also monitor the DB connection pools.
> > >
> > > >
> > > > In the pre-release version that I had looked at, the GC information
> > > > reported in the memory section was not accurate.  They don't match
> up
> > > > with numbers reportes by the platform MBean or the -Xloggc
> output.  I
> > > > was very disappointed to see that in the official release, the gc
> info
> > > > was removed completely instead of being fixed.
> > >
> > > I haven't performed a comparison of the memory section with the GC log
> > > entries that are written to a log file so I can't comment on that.
> > >
> > > Overall, It provides a lot of information about a running Resin server
> > > and the applications that are running on it.  I didn't have to write
> any
> > > custom code to get it.  And to top it all off, the developers are not
> > > currently charging a fee to use it.  Can't beat it.
> > >
> > > Take care,
> > > Keith
> > >
> > >
> > > >
> > > > Throughput was still "Under construction" before and it is now also
> > gone.
> > > >
> > > > Bill
> > > >
> > > > On 6/14/06, *Keith Fetterman* <[email protected]
> > > > <mailto:[email protected] >> wrote:
> > > >
> > > >     I highly recommend Scottit 3.1.
> > > >
> > > >     http://www.ustobe.com/scottit/
> > > >
> > > >     It rocks because it provides a lot of information about the
> running
> > > >     Resin server and the applications that are running.
> > > >
> > > >     David Campbell wrote:
> > > >      > Andy Yates wrote:
> > > >      >> Just a quickie. Apart from performing an ls on the webapps
> > directory
> > > >      >> is there anyway I can query a Resin server to tell me what
> > > >     webapps it
> > > >      >> is currently hosting (by name).
> > > >      >>
> > > >      >> i.e. If I have 4 apps called app, foo, bar, test can I get a
> > webpage
> > > >      >> up which says "Currently hosting app, foo, bar, test".
> > > >      >>
> > > >      >> I'm not about the status of the app just what its got.
> > > >      >
> > > >      > resin-status
> > > >      >
> > > >      > http://www.caucho.com/resin-3.0/jmx/servlet.xtp
> > > >      >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
>
>

------=_Part_2738_5321775.1150977691958
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

If you are using Java 5, take a look at the MXBeans under java.lang.management.<br>
That's what JConsole and Scottit use behind the screen.&nbsp; They are very simple<br>
to use.&nbsp; You will find sample code under demo/management in your JDK install<br>
directory.<br>
<br>
Bill<br><br><div><span class="gmail_quote">On 6/21/06, <b class="gmail_sendername">Jay Ballinger</b> &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
One of our developers, who apparently doesn't have enough work to do,<br>borrowed the thread dump code from Scottit and added it to the<br>ResinStatusServlet with very little effort. Makes for a nice combo. ;)<br><br><br>
<br>On 6/20/06, Bill Au &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br>&gt; Threads count, sessions count, memory usage, db pools are all covered<br>&gt;&nbsp;&nbsp;by ResinStatusServlet.&nbsp;&nbsp;In addition, it also shows the invocation and proxy
<br>&gt; cacahe<br>&gt;&nbsp;&nbsp;hit ratio.&nbsp;&nbsp;We have software in place to monitor threads count and memory<br>&gt; usage<br>&gt;&nbsp;&nbsp;over HTTP.&nbsp;&nbsp;We are also logging gc info to file.&nbsp;&nbsp;I would have been nice if<br>&gt; we can<br>&gt;&nbsp;&nbsp;monitor gc over HTTP too.&nbsp;&nbsp;Too bad that Scottit is reporting inaccurate
<br>&gt; data for gc.<br>&gt;<br>&gt;&nbsp;&nbsp;Yes, jconsole is very nice but it requires that jmxremote to be enabled.<br>&gt;&nbsp;&nbsp;We don't want to pay that overhead in production.&nbsp;&nbsp;Can't want for Java 6<br>&gt; where<br>&gt;&nbsp;&nbsp;jconsole can connect on-demand.
<br>&gt;<br>&gt;&nbsp;&nbsp;Yes, the thread dump is about the only thing that Scottit provides that I<br>&gt; can't get<br>&gt;&nbsp;&nbsp;from ResinStatusServlet.&nbsp;&nbsp;We already have ways to do that before we learn<br>&gt; about<br>&gt;&nbsp;&nbsp;Scottit.&nbsp;&nbsp;So we had decided not to install another webapp (Scottit) just
<br>&gt; for showing<br>&gt;&nbsp;&nbsp;the thread dump.<br>&gt;<br>&gt;&nbsp;&nbsp;Bill<br>&gt;<br>&gt;<br>&gt; On 6/20/06, Keith Fetterman &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br>&gt; &gt; Hi Bill,
<br>&gt; &gt;<br>&gt; &gt; Sorry it took me so long to respond.<br>&gt; &gt;<br>&gt; &gt; Bill Au wrote:<br>&gt; &gt; &gt; What useful information are you getting out of Scottit 3.1 that is not<br>&gt; &gt; &gt; available in ResinStatusServlet?
<br>&gt; &gt;<br>&gt; &gt; We were experiencing a slow down with our Web site, and yet I couldn't<br>&gt; &gt; find any reason for it.&nbsp;&nbsp;All of the physical resources, like server CPU<br>&gt; &gt; performance, network performance, memory consumption, database
<br>&gt; &gt; connections, etc. did not show a problem.&nbsp;&nbsp;When I ran Scottit 3.1, I<br>&gt; &gt; found the problem.&nbsp;&nbsp;The critical information was this:&nbsp;&nbsp;active sessions<br>&gt; &gt; and active threads.&nbsp;&nbsp;Before Scottit, I had no way to see the active
<br>&gt; &gt; sessions and threads in production in real time.&nbsp;&nbsp;My problem ended up<br>&gt; &gt; being the max-threads were way too low.&nbsp;&nbsp;I quadrupled the limit and<br>&gt; &gt; solved my problem.<br>&gt; &gt;<br>&gt; &gt; There is also tons of other useful stuff.&nbsp;&nbsp;I can see a thread dump in
<br>&gt; &gt; real time without having to perform a special command, sending an<br>&gt; &gt; interrupt to the server.<br>&gt; &gt;<br>&gt; &gt; I can see the total memory and with a Java applet I can watch the<br>&gt; &gt; garbage collections.&nbsp;&nbsp;But, If you really want to see the whole memory
<br>&gt; &gt; picture, I recommend using jconsole instead.<br>&gt; &gt;<br>&gt; &gt; Since I was having memory problems about 6 months ago, I currently log<br>&gt; &gt; all GCs to a file so I can monitor it on a daily basis.
<br>&gt; &gt;<br>&gt; &gt; I can also monitor the DB connection pools.<br>&gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; In the pre-release version that I had looked at, the GC information<br>&gt; &gt; &gt; reported in the memory section was not accurate.&nbsp;&nbsp;They don't match up
<br>&gt; &gt; &gt; with numbers reportes by the platform MBean or the -Xloggc output.&nbsp;&nbsp;I<br>&gt; &gt; &gt; was very disappointed to see that in the official release, the gc info<br>&gt; &gt; &gt; was removed completely instead of being fixed.
<br>&gt; &gt;<br>&gt; &gt; I haven't performed a comparison of the memory section with the GC log<br>&gt; &gt; entries that are written to a log file so I can't comment on that.<br>&gt; &gt;<br>&gt; &gt; Overall, It provides a lot of information about a running Resin server
<br>&gt; &gt; and the applications that are running on it.&nbsp;&nbsp;I didn't have to write any<br>&gt; &gt; custom code to get it.&nbsp;&nbsp;And to top it all off, the developers are not<br>&gt; &gt; currently charging a fee to use it.&nbsp;&nbsp;Can't beat it.
<br>&gt; &gt;<br>&gt; &gt; Take care,<br>&gt; &gt; Keith<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Throughput was still &quot;Under construction&quot; before and it is now also<br>&gt; gone.<br>&gt; &gt; &gt;
<br>&gt; &gt; &gt; Bill<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; On 6/14/06, *Keith Fetterman* &lt;<a href="mailto:[email protected]">[email protected]</a><br>&gt; &gt; &gt; &lt;mailto:<a href="mailto:[email protected]">
[email protected]</a> &gt;&gt; wrote:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; I highly recommend Scottit 3.1.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.ustobe.com/scottit/">http://www.ustobe.com/scottit/
</a><br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; It rocks because it provides a lot of information about the running<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Resin server and the applications that are running.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; David Campbell wrote:
<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; Andy Yates wrote:<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt; Just a quickie. Apart from performing an ls on the webapps<br>&gt; directory<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt; is there anyway I can query a Resin server to tell me what
<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; webapps it<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt; is currently hosting (by name).<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt; i.e. If I have 4 apps called app, foo, bar, test can I get a
<br>&gt; webpage<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt; up which says &quot;Currently hosting app, foo, bar, test&quot;.<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt; I'm not about the status of the app just what its got.
<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; resin-status<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; <a href="http://www.caucho.com/resin-3.0/jmx/servlet.xtp">http://www.caucho.com/resin-3.0/jmx/servlet.xtp
</a><br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br>&gt;<br><br></blockquote></div><br>

------=_Part_2738_5321775.1150977691958--