Re: [OT] is tomcat monitoring the keystore file?

2017-10-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 10/26/17 4:55 PM, Mark Thomas wrote:
> On 26/10/17 20:17, Christopher Schultz wrote:
> 
> 
> 
>> So this is relying on the OpenSSLContext.finalize() method to
>> clean-up after the native SSL context?
> 
> Correct.
> 
>> It's been "recommended" to not rely on finalizers for quite a
>> long time. Is that advice no longer correct?
> 
> Like most general rules there are exceptions. Arguably, this is one
> of them. The alternative would require an awful lot of code to
> replicate what the JVM is already doing.

Yes. When we spoke in person, we were both a little concerned about
doing things like reference-counting to make sure that long-lived
connections such as Websockets didn't get cut-off at the knees while
also avoiding memory leaks.

I think use of a finalizer is the correct solution.

> I believe there are better options available in Java 9.

Such as? I haven't looked at Java 9 very closely at all.

>> I'm particularly concerned about native memory leaks.
> 
> The argument against finalizers is that they might never run as the
> JVM could shutdown before they are called. In this case, that
> doesn't present a problem.

+1

> We'd have a problem if an object could be GC'd without the
> finializer running. I'm not aware of any scenarios where that
> happens.

Okay, good.

My biggest concern is that the GC will take the laziest route and
simply NEVER call the finalizer -- and also not GC the object. I can't
imagine how the GC could know which objects might be "complicated" to
finalize and for some reason decide to just stuff them in the closet
forever.

I just wanted to bring up the subject to make sure it was a deliberate
decision. Thanks for clarifying.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAln3NmMACgkQHPApP6U8
pFiB4A//a3rDY2ZV3iJHIvWb/DdrI5riqAO12bZWkNbF3e7FDSxrXx/0X8/+pu3O
9laCZzVyFeRUdzIXXbtRVaI2gf8a1ZMve9UagciFwhkO0Z4IdzvXhEFDTyjmRo1c
bVlgdGFWEHzs+b/snM/H8y4Ak1J3Psr3UNz6GeZjH93cogJ9OWUouqRLYpWzPdtW
XHqXAg/p3H15FVc1Anwre8h2jVcDFy9G2d0dBODnq/oTHCYaErDQ6cS//jUfPlNZ
L848Tp0lB+FZQcSdraQsjATdP/gPpsgmbHbS1r39wOjAf7VSZdLlZFXvDuv0KB2l
rkQJ/C5sO1mHwSQNghcNDjLoCZ6mjPQMtfHLNy2Q/CY3dFt8YAt4f/ITY/H2f7Kd
kmUPAyyGDDpDQenjAZQQ+C60NqqEa6JPTUn5n2+a9520VKviWaWvupjUn3u7XRot
eQu614ikiR09M4diLvslkCH/0bBqgagdNJ70D2qqCT2F2IUGCZlDz+LaJokkwF3m
jaw+WhVRQs+PkWHTYYecYrTCbS6kxQZJsyPjUNPeChxNccVI+s2K7BRsvGiQz/Pa
TujcguxY3+6rphEGp49edZqIFoUb/90NxCXZZpC7PEUnyy67dut4PUUqpie2LOfD
hnha9vUHj2DG74JljZghHWV5W5Un5fDbPfBSnt5h5JVJzqHBvIM=
=R0Ch
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] is tomcat monitoring the keystore file?

2017-10-26 Thread Mark Thomas
On 26/10/17 20:17, Christopher Schultz wrote:



> So this is relying on the OpenSSLContext.finalize() method to clean-up
> after the native SSL context?

Correct.

> It's been "recommended" to not rely on
> finalizers for quite a long time. Is that advice no longer correct?

Like most general rules there are exceptions. Arguably, this is one of
them. The alternative would require an awful lot of code to replicate
what the JVM is already doing.

I believe there are better options available in Java 9.

> I'm particularly concerned about native memory leaks.

The argument against finalizers is that they might never run as the JVM
could shutdown before they are called. In this case, that doesn't
present a problem.

We'd have a problem if an object could be GC'd without the finializer
running. I'm not aware of any scenarios where that happens.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] is tomcat monitoring the keystore file?

2017-10-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 10/26/17 12:07 PM, Mark Thomas wrote:
> On 26 October 2017 14:36:03 BST, Christopher Schultz
>  wrote:
>> Mark,
>> 
>> On 10/26/17 8:54 AM, Mark Thomas wrote:
>>> On 26/10/2017 09:31, Johan Compagner wrote:
 Hi,
 
 now with LetsCrypt its easy (and free) to get https up and 
 running even if you just use tomcat But the problem is those 
 certificate must be renewed every 3 months This is easy to do
 in a crontab script (that does the renew and makes a java
 keystore again) So i can generate the pfx constantly just
 fine
 
 But does tomcat monitor that file for changes and will it
 then use the new one without restarting the whole server?
>>> 
>>> Currently, no.
>>> 
>>> We have just added the ability to 9.0.x and 8.5.x to reload the
>>>  certificate file on the fly.
>> 
>> Can you point me to some specific commits that implement that?
>> I've been dragging my feet on the work to reload *everything* and
>> if the cert-reloading has already been done, then it seems that
>> most -- if not all -- the work I expected to do is already done.
> 
> http://svn.apache.org/viewvc?view=revision&revision=1808482
> 
> Mark
> 
>> 
>> One of the reasons I hadn't done it yet was because I wasn't
>> sure about which of the many Tomcat components should warehouse
>> that code... there are so many layers and I don't understand
>> exactly which ones are responsible for what things.
>> 
>> Do these patches include replacing the SSLContext, or only the
>> key material that is being used for the handshake for an
>> existing SSLContext ?
> 
> It provides a new SSLContext that will be used for all new
> connections.

Thanks.

So this is relying on the OpenSSLContext.finalize() method to clean-up
after the native SSL context? It's been "recommended" to not rely on
finalizers for quite a long time. Is that advice no longer correct?

I'm particularly concerned about native memory leaks.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlnyNM8dHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFh4Eg/+OJdiVLJp4XhPGvd4
kPvUmebwXez+f6JYFORqurxavbKk/i+4ttA9qls3iezxU/uABUY7LpUaHekFQK2m
dvCHv9/A7tF3lti6vY46UUUzp0t/3eJCBYl5lyQ/HRvNfacfhfTckaAYe/+1BiqB
Sj/75y5S5kV6tCJJMOiDIeitXhD/n8CzlJ6S4ReTVT9zuFNA0dShdH3LXeJJmQL3
RnWsxDZDkBDA9k3cH82tufJgCsez7GKDQBmitIlwNpf3Za4v4+QX4djDe0QdPjT8
WL62TaiDJvSjjIpR/j6eHxu6b7JO0orXyfT2LuiTQg7hPktCU+c1u2ePTUbx1NgF
v0gBXIBlTydbykw5tNPhA5vTEl7fSms45Uf7SJJz+ET8RgeU6G7JsAaAHRe+KKor
Xs8xMJMZyvz7SmW76pdkEVd8H+oYSUODbWVbLxMol3f7dZ7WqjsOt5jDoMHenzch
1A2168LQ3eZqSIRto00AnDVXUhEkIMLe6t9PKb+RGZ1CMEgvY3zqYtbkVIjbchf0
Q9GotkU/aSMLnEgJadY71HRhDGmZfDGx6PJZWG1BTQFHJO5al7hq8vxZhMBJPtiq
KOrbl6ydVVkWxKNjSaN/UAS309SQCrxVv9BYOS54GU5wzrCqo58Y3tTxWdXpXQpD
iSn0i2y+ujRDGFUeUdxuPqFkj3U=
=xwUc
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] is tomcat monitoring the keystore file?

2017-10-26 Thread Mark Thomas
On 26 October 2017 14:36:03 BST, Christopher Schultz 
 wrote:
>Mark,
>
>On 10/26/17 8:54 AM, Mark Thomas wrote:
>> On 26/10/2017 09:31, Johan Compagner wrote:
>>> Hi,
>>> 
>>> now with LetsCrypt its easy (and free) to get https up and
>>> running even if you just use tomcat But the problem is those
>>> certificate must be renewed every 3 months This is easy to do in
>>> a crontab script (that does the renew and makes a java keystore
>>> again) So i can generate the pfx constantly just fine
>>> 
>>> But does tomcat monitor that file for changes and will it then
>>> use the new one without restarting the whole server?
>> 
>> Currently, no.
>> 
>> We have just added the ability to 9.0.x and 8.5.x to reload the 
>> certificate file on the fly.
>
>Can you point me to some specific commits that implement that? I've
>been dragging my feet on the work to reload *everything* and if the
>cert-reloading has already been done, then it seems that most -- if
>not all -- the work I expected to do is already done.

http://svn.apache.org/viewvc?view=revision&revision=1808482

Mark

>
>One of the reasons I hadn't done it yet was because I wasn't sure
>about which of the many Tomcat components should warehouse that
>code... there are so many layers and I don't understand exactly which
>ones are responsible for what things.
>
>Do these patches include replacing the SSLContext, or only the key
>material that is being used for the handshake for an existing
>SSLContext
>?

It provides a new SSLContext that will be used for all new connections.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: is tomcat monitoring the keystore file?

2017-10-26 Thread James H. H. Lampert

On 26/10/2017 09:31, Johan Compagner wrote:
. . .

But does tomcat monitor that file for changes and will it then use
the new one without restarting the whole server?


On 10/26/17, 5:54 AM, Mark Thomas replied:

Currently, no.

We have just added the ability to 9.0.x and 8.5.x to reload the
certificate file on the fly.

. . .

I was wondering about that myself; I know from experience that it 
definitely does NOT hot-switch to a new keystore when running on an 
AS/400, but wasn't sure about other platforms.


--
JHHL

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] is tomcat monitoring the keystore file?

2017-10-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 10/26/17 8:54 AM, Mark Thomas wrote:
> On 26/10/2017 09:31, Johan Compagner wrote:
>> Hi,
>> 
>> now with LetsCrypt its easy (and free) to get https up and
>> running even if you just use tomcat But the problem is those
>> certificate must be renewed every 3 months This is easy to do in
>> a crontab script (that does the renew and makes a java keystore
>> again) So i can generate the pfx constantly just fine
>> 
>> But does tomcat monitor that file for changes and will it then
>> use the new one without restarting the whole server?
> 
> Currently, no.
> 
> We have just added the ability to 9.0.x and 8.5.x to reload the 
> certificate file on the fly.

Can you point me to some specific commits that implement that? I've
been dragging my feet on the work to reload *everything* and if the
cert-reloading has already been done, then it seems that most -- if
not all -- the work I expected to do is already done.

One of the reasons I hadn't done it yet was because I wasn't sure
about which of the many Tomcat components should warehouse that
code... there are so many layers and I don't understand exactly which
ones are responsible for what things.

Do these patches include replacing the SSLContext, or only the key
material that is being used for the handshake for an existing SSLContext
?

> It should be relatively easy to add a component that watches for 
> changes to the cert file (or any of the other files) and trigger a 
> reload as required. I suggest opening an enhancement request in 
> Bugzilla.

+1

> Whether it is a whole new component or just something that gets
> added to the existing back ground processing framework for an
> existing component is TBD.
> 
> If you'd like to work on a patch to implement this, pop over to the
> dev list and we'll point you in the right direction.

- -chris

-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlnx5MMACgkQHPApP6U8
pFjxfw//aKlCe4jMAFdLP1djFjcmlO3vfmrFaf+mHdhLS4c6WMSk4+yIxzUsowDx
TeKpdGOK02RTVRg1MC9AB5Y00H5bs5ztuOOdYMODS4qMzKm69NJTURuAraWJ1hbi
vvn+8Yg77P8/6MDBwoooh3z96WpDENbP3ROZan3reWf2ViBPBbVyoNbNb1pESvow
ZKFzP6fntKc1ecqOxmXPj3Uu0R0pul4FF16CSz6JD2T90Ws9Rf8vAqd54F/RKngn
2WrKtTr08F2kZoSo+qI6O21dUcbEWh8gvtaLtPNMo4YpIqZsE7mXfU3ZDSEKLK+q
pQPQluICNt+5QPaYIKIqy20t2mAFS/K2QSnIdkGqJuEt4wXYuZ45x3rck5VpC8tJ
P9+NcQmS2hUqeJKjWDLX98W6H5BsEAsX6gGZP9beA7RsBOk+7TmL+MRGf+BOI3Cy
dJ845nM3ecnhlz7OtIvJopC87QM0LpWKAtbKkqHLShzo4lXgaDzcyCOb6m/ozGGG
mhesNbX5fDZfUI4dMR95Wgp5Xpvf2drYszvWCnl/cgtEYc+anUh47ADNIc8h6KnF
KLXBOAV+MuVEWFIi1HfCWrpwoIYQQGNTsYlBSEvNsBUd20IGQ25+xII4ERtXKXbA
fw2OHtgqtF2KtHsIwLXFaMHJN+EXIRPbMY/Fwu04A5utGN6iVfw=
=yrp/
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: is tomcat monitoring the keystore file?

2017-10-26 Thread Mark Thomas
On 26/10/2017 09:31, Johan Compagner wrote:
> Hi,
> 
> now with LetsCrypt its easy (and free) to get https up and running even if
> you just use tomcat
> But the problem is those certificate must be renewed every 3 months
> This is easy to do in a crontab script (that does the renew and makes a
> java keystore again)
> So i can generate the pfx constantly just fine
> 
> But does tomcat monitor that file for changes and will it then use the new
> one without restarting the whole server?

Currently, no.

We have just added the ability to 9.0.x and 8.5.x to reload the
certificate file on the fly. It should be relatively easy to add a
component that watches for changes to the cert file (or any of the other
files) and trigger a reload as required. I suggest opening an
enhancement request in Bugzilla.

Whether it is a whole new component or just something that gets added to
the existing back ground processing framework for an existing component
is TBD.

If you'd like to work on a patch to implement this, pop over to the dev
list and we'll point you in the right direction.

Mark


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



is tomcat monitoring the keystore file?

2017-10-26 Thread Johan Compagner
Hi,

now with LetsCrypt its easy (and free) to get https up and running even if
you just use tomcat
But the problem is those certificate must be renewed every 3 months
This is easy to do in a crontab script (that does the renew and makes a
java keystore again)
So i can generate the pfx constantly just fine

But does tomcat monitor that file for changes and will it then use the new
one without restarting the whole server?


-- 
Johan Compagner
Servoy


Re: Tomcat Monitoring - Thread usage - currentThreadCount or currentThreadBusy

2013-08-16 Thread Vikram Jain
Thank you, Christopher.

Regards,
Vikram


On Fri, Aug 16, 2013 at 7:42 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Vikram,
>
> On 8/14/13 9:42 PM, Vikram Jain wrote:
> > I am working on Tomcat monitoring solution for a project and when
> > it comes to monitoring 'Thread usage', I am wondering whether I
> > should be comparing 'currentThreadCount' or 'currentThreadBusy'
> > attribute against 'maxThread' to generate an alert. Is
> > currentThreadBusy the actual represntation of the activeThread
> > count ? If currentThreadCount increases when there is an increase
> > in need of request processing threads and once the requests are
> > processed, whether the currentThreadCount drops ?
>
> I would go for "currentThreadBusy" because your thread count could ==
> maxThread which just means that all potential threads have been
> allocated -- not that they are all busy at the same time.
>
> > Please assist. If you find it relevant, please also update the docs
> > to the benefit of other users :)
>
> There are some existing notes about using JMX for monitoring here:
> http://wiki.apache.org/tomcat/FAQ/Monitoring
>
> Feel free to add your own commentary if it can be helpful.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.14 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJSDUszAAoJEBzwKT+lPKRYf3AP/2t6EAnw836R/2D6zbngkELk
> dVlzJXhK0qixwzwc/ZOJX1CZGbLDecMgmxG12p5n5WEEzqppkXdDe+rc+HPb1zPc
> CIEr6qVGH3ydbG/O6qn+opEOKf8DQuPlu/MM43uC7pUQm7O4/Ehegg+1ubBEhRHg
> y1PhJC2IPQM9esz/fUzqXf5nL5Y7uUE/2TfvKCP5zhu3EUPm1K5WVXI2/CnhcmXP
> +KXmjtlrGUA7OA5ERcW9TSGJQD343EigN92nA4zRn5UrfOL18P2VK1fEC+zbmr3u
> tS0WxAKylh/uLgbuAUediB2z+UxzwpYhtZC+NNu+r/cbToLw39cNHS6CAKOZw4f3
> ChPUAdDkp3qs0AJDzihNtxtGQcWTwjcHBQBvzhD2X0EUQPU+qWmP6OopEpMRyYEk
> RYeulZ1IAgs7Z9I4SgSnsuH5n7GWLXOU4cStnGSyehljm3420n986Y4H1kIEgEXs
> hxV5TzqE2fjbCZXDfqMZaLzCxk2ORqiHEPBxALZ1rIuDADi5xNo/q6ZnlvD/HMQ5
> gEujDWvCI2vSn4LughMQKy1fU2DoGXeJSTdaFwmMdANAOoG8fJa5RrZwrT3hoLNX
> hz/2yiB/pOSQxZDFDV/by8tFhA+LXZop1E5FacEnQVlzuSPacdKU5tCAp32pEYgG
> LwbRej65xANHvGOkte82
> =hyJ3
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat Monitoring - Thread usage - currentThreadCount or currentThreadBusy

2013-08-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Vikram,

On 8/14/13 9:42 PM, Vikram Jain wrote:
> I am working on Tomcat monitoring solution for a project and when
> it comes to monitoring 'Thread usage', I am wondering whether I
> should be comparing 'currentThreadCount' or 'currentThreadBusy'
> attribute against 'maxThread' to generate an alert. Is
> currentThreadBusy the actual represntation of the activeThread
> count ? If currentThreadCount increases when there is an increase
> in need of request processing threads and once the requests are
> processed, whether the currentThreadCount drops ?

I would go for "currentThreadBusy" because your thread count could ==
maxThread which just means that all potential threads have been
allocated -- not that they are all busy at the same time.

> Please assist. If you find it relevant, please also update the docs
> to the benefit of other users :)

There are some existing notes about using JMX for monitoring here:
http://wiki.apache.org/tomcat/FAQ/Monitoring

Feel free to add your own commentary if it can be helpful.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSDUszAAoJEBzwKT+lPKRYf3AP/2t6EAnw836R/2D6zbngkELk
dVlzJXhK0qixwzwc/ZOJX1CZGbLDecMgmxG12p5n5WEEzqppkXdDe+rc+HPb1zPc
CIEr6qVGH3ydbG/O6qn+opEOKf8DQuPlu/MM43uC7pUQm7O4/Ehegg+1ubBEhRHg
y1PhJC2IPQM9esz/fUzqXf5nL5Y7uUE/2TfvKCP5zhu3EUPm1K5WVXI2/CnhcmXP
+KXmjtlrGUA7OA5ERcW9TSGJQD343EigN92nA4zRn5UrfOL18P2VK1fEC+zbmr3u
tS0WxAKylh/uLgbuAUediB2z+UxzwpYhtZC+NNu+r/cbToLw39cNHS6CAKOZw4f3
ChPUAdDkp3qs0AJDzihNtxtGQcWTwjcHBQBvzhD2X0EUQPU+qWmP6OopEpMRyYEk
RYeulZ1IAgs7Z9I4SgSnsuH5n7GWLXOU4cStnGSyehljm3420n986Y4H1kIEgEXs
hxV5TzqE2fjbCZXDfqMZaLzCxk2ORqiHEPBxALZ1rIuDADi5xNo/q6ZnlvD/HMQ5
gEujDWvCI2vSn4LughMQKy1fU2DoGXeJSTdaFwmMdANAOoG8fJa5RrZwrT3hoLNX
hz/2yiB/pOSQxZDFDV/by8tFhA+LXZop1E5FacEnQVlzuSPacdKU5tCAp32pEYgG
LwbRej65xANHvGOkte82
=hyJ3
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Monitoring - Thread usage - currentThreadCount or currentThreadBusy

2013-08-15 Thread Leon Rosenberg
Hello Vikram,

if you are working on a monitoring solution for tomcat I suggest you take a
look at moskito: http://www.moskito.org.

regards
Leon


On Thu, Aug 15, 2013 at 3:42 AM, Vikram Jain  wrote:

> Hi Team,
>
> I'm Vikram Jain. My first query to Tomcat user group, looking forward to
> hear from you. :)
>
> I am working on Tomcat monitoring solution for a project and when it comes
> to monitoring 'Thread usage', I am wondering whether I should be comparing
> 'currentThreadCount' or 'currentThreadBusy' attribute against 'maxThread'
> to generate an alert.
> Is currentThreadBusy the actual represntation of the activeThread count ?
> If currentThreadCount increases when there is an increase in need of
> request processing threads and once the requests are processed, whether the
> currentThreadCount drops ?
>
> Please assist. If you find it relevant, please also update the docs to the
> benefit of other users :)
>
> Regards,
> Vikram
>


Tomcat Monitoring - Thread usage - currentThreadCount or currentThreadBusy

2013-08-14 Thread Vikram Jain
Hi Team,

I'm Vikram Jain. My first query to Tomcat user group, looking forward to
hear from you. :)

I am working on Tomcat monitoring solution for a project and when it comes
to monitoring 'Thread usage', I am wondering whether I should be comparing
'currentThreadCount' or 'currentThreadBusy' attribute against 'maxThread'
to generate an alert.
Is currentThreadBusy the actual represntation of the activeThread count ?
If currentThreadCount increases when there is an increase in need of
request processing threads and once the requests are processed, whether the
currentThreadCount drops ?

Please assist. If you find it relevant, please also update the docs to the
benefit of other users :)

Regards,
Vikram


Re: how can I figure out if tomcat is blocking and needs more threads? production tomcat monitoring tips.

2011-12-28 Thread Mark Thomas
On 28/12/2011 22:27, S Ahmed wrote:
> While benchmarking, I want to know if/when tomcat requires more threads
> (maxThreads).
> 
> How can I figure this out?

Look in the logs. Tomcat reports the first time (and only the first
time) it hits maxThreads.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



how can I figure out if tomcat is blocking and needs more threads? production tomcat monitoring tips.

2011-12-28 Thread S Ahmed
While benchmarking, I want to know if/when tomcat requires more threads
(maxThreads).

How can I figure this out?

i.e. I start benchmarking tomcat to see how it reacts to a high-traffic
spike, I want to make sure that tomcat isn't hitting the maxThreads when my
server has the ability resource wise.


Would jconsole be the only way?  Or will tomcat write to a log file also?
(so in a production setting I can scan my logs for these sort of
performance metrics etc.)

For production environments, how do you guys monitor tomcat? (for OOM,
hitting maxthreads limit, long GC cycles, etc.)


RE: Simple Tomcat monitoring ?

2011-04-29 Thread Matteo Turra
Try to analyze your java process with
http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html
and 
http://visualvm.java.net/



-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: martedì 12 aprile 2011 15:43
To: Tomcat Users List
Subject: Re: Simple Tomcat monitoring ?

Caldarale, Charles R wrote:
>> From: André Warnier [mailto:a...@ice-sa.com]
>> Subject: Simple Tomcat monitoring ?
> 
>>   5396 root  20   0  832m 610m 9224 S  100  5.1  12:32.43 java
> 
>> the second task visible above is the interface to the search engine).
> 
> Which seems to be single-thread and thus a possible bottleneck.  The 100% CPU 
> usage is very suspicious.

I thought so too, but it does not seem to be.
When I use the command
ps -p 5396 -Lf
I see multiple "instances", all running the same command. They all have the 
same PID, but different numbers in the "LWP" column (Light-Weight-Process ?).

> 
>> which would be the easiest/quickest way of starting to figure out 
>> what this tomcat is doing, and where the system/application 
>> bottleneck might be ?
> 
> This has proven to be a useful tool to look inside a running Tomcat:
> http://moskito.anotheria.net/
> 
I had a (very) quick look at the website.
 From what I gather at this first look though, it seems already a bit 
"invasive", in the sense that it seems that to start collecting any information 
at all about a servlet or tomcat, the least one can do (unless one controls the 
source code of the application, which I do not), is to configure another 
classloader etc..
That means changing the Tomcat configuration and restarting Tomcat.
That's maybe a bit more than what I am looking for right now.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Simple Tomcat monitoring ?

2011-04-12 Thread André Warnier

Caldarale, Charles R wrote:
From: André Warnier [mailto:a...@ice-sa.com] 
Subject: Simple Tomcat monitoring ?



  5396 root  20   0  832m 610m 9224 S  100  5.1  12:32.43 java



the second task visible above is the interface to the search engine).


Which seems to be single-thread and thus a possible bottleneck.  The 100% CPU 
usage is very suspicious.


I thought so too, but it does not seem to be.
When I use the command
ps -p 5396 -Lf
I see multiple "instances", all running the same command. They all have the same PID, but 
different numbers in the "LWP" column (Light-Weight-Process ?).




which would be the easiest/quickest way of starting to figure 
out what this tomcat is doing, and where the system/application

bottleneck might be ?


This has proven to be a useful tool to look inside a running Tomcat:
http://moskito.anotheria.net/


I had a (very) quick look at the website.
From what I gather at this first look though, it seems already a bit "invasive", in the 
sense that it seems that to start collecting any information at all about a servlet or 
tomcat, the least one can do (unless one controls the source code of the application, 
which I do not), is to configure another classloader etc..

That means changing the Tomcat configuration and restarting Tomcat.
That's maybe a bit more than what I am looking for right now.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Simple Tomcat monitoring ?

2011-04-12 Thread Francis GALIEGUE
On Tue, Apr 12, 2011 at 14:26, André Warnier  wrote:
> Francis GALIEGUE wrote:
>>
>> On Tue, Apr 12, 2011 at 12:20, André Warnier  wrote:
>> [...]
>>>
>>> Considering all the above, which would be the easiest/quickest way of
>>> starting to figure out what this tomcat is doing, and where the
>>> system/application bottleneck might be ?
>>>
>>
>> We have the following tools, all very easy to setup and run:
>>
>> * SNMP monitoring of the JVM (allows to see the amount of memory
>> consumed, the number of threads, and others - the MIB is well
>> defined);
>> * a shell script sending the results of a kill -3 on the JVM (a thread
>> dump);
>> * a script which triggers when a java.lang.OutOfMemoryError is thrown.
>>
>> If you are interested in any of it, I can tell you how we do it.
>>
>> And, considering that your server has 12 GB RAM, you could indeed do
>> with a little more heap space!
>>
>
> Thanks. I think I'll accept your offer of details.
>
> I don't think that OOM is a problem, but the first 2 would be a good start.
>
> About SNMP monitoring : I already have a "munin agent" installed on that
> system, and a munin server collecting stuff like overall cpu and memory
> usage.
> To your knowledge, does there exist a way to collect this JVM SNMP
> information via a munin plugin ?
>

I don't use Munin, I use cacti, but if Munin can collect SNMP
information then it's only a matter of having Munin fetch the
appropriate OIDs. More details in a separate mail.

>
> About the script doing a kill -3 : where does the thread dump go, when you
> do that ? and how does the script know which PID is Tomcat ?
>

Mine does since the environment fetches the PID file and sends the
signal to that process. It sends output to either stdout or stderr, I
don't know. Script attached. Read the comments carefully, it is
somewhat a hack (could be improved by detecting, say, if the output
went to stderr).

> On that system, the tomcat processes look like this :
>
> # ps -ef | grep java
> root     20997     1  0 12:18 ?        00:00:00 /usr/bin/jsvc -user tomcat55
> -cp
> /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar
> -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid
> -Djava.awt.headless=true -Xms128M -Xmx128M
> -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed
> -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5
> -Djava.io.tmpdir=/var/lib/tomcat5.5/temp
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties
> org.apache.catalina.startup.Bootstrap
> root     20998 20997  0 12:18 ?        00:00:00 /usr/bin/jsvc -user tomcat55
> -cp
> /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar
> -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid
> -Djava.awt.headless=true -Xms128M -Xmx128M
> -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed
> -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5
> -Djava.io.tmpdir=/var/lib/tomcat5.5/temp
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties
> org.apache.catalina.startup.Bootstrap
> tomcat55 20999 20997  0 12:18 ?        00:00:04 /usr/bin/jsvc -user tomcat55
> -cp
> /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar
> -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid
> -Djava.awt.headless=true -Xms128M -Xmx128M
> -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed
> -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5
> -Djava.io.tmpdir=/var/lib/tomcat5.5/temp
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties
> org.apache.catalina.startup.Bootstrap
> vogon2:~#
>
> So there are 3 Tomcat-related processes, all running under jsvc.  I am not
> quite sure which one does what.
>

Wild guess: it's the one in the PID file that matters (-pidfile
/xxx). It should be a variable in the Tomcat base configuration
file.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

RE: Simple Tomcat monitoring ?

2011-04-12 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com] 
> Subject: Simple Tomcat monitoring ?

>   5396 root  20   0  832m 610m 9224 S  100  5.1  12:32.43 java

> the second task visible above is the interface to the search engine).

Which seems to be single-thread and thus a possible bottleneck.  The 100% CPU 
usage is very suspicious.

> which would be the easiest/quickest way of starting to figure 
> out what this tomcat is doing, and where the system/application
> bottleneck might be ?

This has proven to be a useful tool to look inside a running Tomcat:
http://moskito.anotheria.net/

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Re: Simple Tomcat monitoring ?

2011-04-12 Thread Borut Hadžialić
You could check it apache threads are the problem by using something like:

ps -feH | grep httpd | wc
(or something else instead httpd to hit only apache processes)

If the line number gets close to 150 (Apache (prefork) MaxClients)
then that is the problem.


On Tue, Apr 12, 2011 at 2:18 PM, André Warnier  wrote:
> Borut Hadžialić wrote:
>>
>> I'm gonna try to make a guess here :)
>>
>>> top - 08:20:02 up 72 days,  9:39,  4 users,  load average: 6.83, 5.63,
>>> 3.16
>>> Tasks: 265 total,   1 running, 264 sleeping,   0 stopped,   0 zombie
>>> Cpu(s):  0.2%us,  0.1%sy,  0.0%ni, 99.2%id,  0.5%wa,  0.0%hi,  0.0%si,
>>>  0.0%st
>>> Mem:  12328624k total, 11382976k used,   945648k free,   123400k buffers
>>> Swap:  4882424k total,      860k used,  4881564k free,  7565012k cached
>>
>> - somewhat large load average (6.83)
>> - but no io waiting (0.5%wa),
>> - app is heavily used
>> - tomcat requests take long time (sometimes takes few seconds to
>> produce the answer).
>>
>> Could it be a lack of threads at apache or tomcat?
>
> Spot on for the observation.
>
> That is one of the things that puzzle me : overall CPU usage is very low,
> and there is no i/o wait.  Yet the load average is high (which should mean
> that a number of processes are constantly waiting for something), and Tomcat
> is using 333% of CPU time (which may be very little time in an absolute
> sense, but is puzzling anyway).
> And the clients are waiting.
> So where are the time/resources being spent ?
>
> About threads :
> - Apache (prefork) MaxClients is set to 150
> - Tomcat AJP Connector does not specify any thread parameters, so defaults
> apply, which should be :
> maxThreads : 200
> maxSpareThreads : 50
> minSpareThreads : 4
>
> Considering that Apache handles most requests for static contents, I think
> that the numbers should be about right.
> But not having so far done any real monitoring, that may be wrong.  Which is
> one of the things I'd like to check.
>
> I think I'll start by making the Tomcat AJP Connector parameters explicit,
> and raise the minSpareThreads a bit.  And also its Heap size.
> But I don't like to start changing things left and right, without knowing
> exactly why I'm doing it.
>
> Is there for example any parameter or command-line switch that I can use for
> the JVM or Tomcat, which would tell me a bit more (in the logs) about when
> Tomcat is starting a new thread, how many are alive on average etc.. ?
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>



-- 
Why?
Because YES!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Simple Tomcat monitoring ?

2011-04-12 Thread André Warnier

Francis GALIEGUE wrote:

On Tue, Apr 12, 2011 at 12:20, André Warnier  wrote:
[...]

Considering all the above, which would be the easiest/quickest way of
starting to figure out what this tomcat is doing, and where the
system/application bottleneck might be ?



We have the following tools, all very easy to setup and run:

* SNMP monitoring of the JVM (allows to see the amount of memory
consumed, the number of threads, and others - the MIB is well
defined);
* a shell script sending the results of a kill -3 on the JVM (a thread dump);
* a script which triggers when a java.lang.OutOfMemoryError is thrown.

If you are interested in any of it, I can tell you how we do it.

And, considering that your server has 12 GB RAM, you could indeed do
with a little more heap space!



Thanks. I think I'll accept your offer of details.

I don't think that OOM is a problem, but the first 2 would be a good start.

About SNMP monitoring : I already have a "munin agent" installed on that system, and a 
munin server collecting stuff like overall cpu and memory usage.
To your knowledge, does there exist a way to collect this JVM SNMP information via a munin 
plugin ?



About the script doing a kill -3 : where does the thread dump go, when you do that ? and 
how does the script know which PID is Tomcat ?


On that system, the tomcat processes look like this :

# ps -ef | grep java
root 20997 1  0 12:18 ?00:00:00 /usr/bin/jsvc -user tomcat55 -cp 
/usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar -outfile SYSLOG 
-errfile SYSLOG -pidfile /var/run/tomcat5.5.pid -Djava.awt.headless=true -Xms128M -Xmx128M 
-Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed 
-Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 
-Djava.io.tmpdir=/var/lib/tomcat5.5/temp 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties 
org.apache.catalina.startup.Bootstrap
root 20998 20997  0 12:18 ?00:00:00 /usr/bin/jsvc -user tomcat55 -cp 
/usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar -outfile SYSLOG 
-errfile SYSLOG -pidfile /var/run/tomcat5.5.pid -Djava.awt.headless=true -Xms128M -Xmx128M 
-Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed 
-Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 
-Djava.io.tmpdir=/var/lib/tomcat5.5/temp 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties 
org.apache.catalina.startup.Bootstrap
tomcat55 20999 20997  0 12:18 ?00:00:04 /usr/bin/jsvc -user tomcat55 -cp 
/usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar -outfile SYSLOG 
-errfile SYSLOG -pidfile /var/run/tomcat5.5.pid -Djava.awt.headless=true -Xms128M -Xmx128M 
-Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed 
-Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 
-Djava.io.tmpdir=/var/lib/tomcat5.5/temp 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties 
org.apache.catalina.startup.Bootstrap

vogon2:~#

So there are 3 Tomcat-related processes, all running under jsvc.  I am not quite sure 
which one does what.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Simple Tomcat monitoring ?

2011-04-12 Thread André Warnier

Borut Hadžialić wrote:

I'm gonna try to make a guess here :)


top - 08:20:02 up 72 days,  9:39,  4 users,  load average: 6.83, 5.63, 3.16
Tasks: 265 total,   1 running, 264 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us,  0.1%sy,  0.0%ni, 99.2%id,  0.5%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  12328624k total, 11382976k used,   945648k free,   123400k buffers
Swap:  4882424k total,  860k used,  4881564k free,  7565012k cached


- somewhat large load average (6.83)
- but no io waiting (0.5%wa),
- app is heavily used
- tomcat requests take long time (sometimes takes few seconds to
produce the answer).

Could it be a lack of threads at apache or tomcat?


Spot on for the observation.

That is one of the things that puzzle me : overall CPU usage is very low, and there is no 
i/o wait.  Yet the load average is high (which should mean that a number of processes are 
constantly waiting for something), and Tomcat is using 333% of CPU time (which may be very 
little time in an absolute sense, but is puzzling anyway).

And the clients are waiting.
So where are the time/resources being spent ?

About threads :
- Apache (prefork) MaxClients is set to 150
- Tomcat AJP Connector does not specify any thread parameters, so defaults apply, which 
should be :

maxThreads : 200
maxSpareThreads : 50
minSpareThreads : 4 

Considering that Apache handles most requests for static contents, I think that the 
numbers should be about right.
But not having so far done any real monitoring, that may be wrong.  Which is one of the 
things I'd like to check.


I think I'll start by making the Tomcat AJP Connector parameters explicit, and raise the 
minSpareThreads a bit.  And also its Heap size.
But I don't like to start changing things left and right, without knowing exactly why I'm 
doing it.


Is there for example any parameter or command-line switch that I can use for the JVM or 
Tomcat, which would tell me a bit more (in the logs) about when Tomcat is starting a new 
thread, how many are alive on average etc.. ?




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Simple Tomcat monitoring ?

2011-04-12 Thread Borut Hadžialić
I'm gonna try to make a guess here :)

> top - 08:20:02 up 72 days,  9:39,  4 users,  load average: 6.83, 5.63, 3.16
> Tasks: 265 total,   1 running, 264 sleeping,   0 stopped,   0 zombie
> Cpu(s):  0.2%us,  0.1%sy,  0.0%ni, 99.2%id,  0.5%wa,  0.0%hi,  0.0%si,  0.0%st
> Mem:  12328624k total, 11382976k used,   945648k free,   123400k buffers
> Swap:  4882424k total,  860k used,  4881564k free,  7565012k cached

- somewhat large load average (6.83)
- but no io waiting (0.5%wa),
- app is heavily used
- tomcat requests take long time (sometimes takes few seconds to
produce the answer).

Could it be a lack of threads at apache or tomcat?

On Tue, Apr 12, 2011 at 12:20 PM, André Warnier  wrote:
> Hi.
>
> I have a Linux application server running Apache + mod_jk + tomcat 5.5 (I
> know that it is relatively old; and to compound the heresy, it is installed
> from a Debian package).
> The hardware is quite OK (quad-core fast CPU, 12 GB RAM).
>
> Apache is serving most of the static content, and passing some requests to
> Tomcat via AJP.  Tomcat runs basically a single application, but this
> webapp, although itself quite small, can be heavily used : it is an
> interface to a text retrieval system (a kind of database specialised for
> textual data), and some of the searches made by users can take several
> seconds to come back with results, which may themselves be several pages of
> data.
>
> I can access the host remotely via SSH and via HTTP, and have full control
> of it.
> But it is a productive customer server, so there are limits to what I can
> do.
>
> I am having performance issues with that system : users at times complain
> that "they cannot access the application", and I see things like this in a
> "top" display :
>
> top - 08:20:02 up 72 days,  9:39,  4 users,  load average: 6.83, 5.63, 3.16
> Tasks: 265 total,   1 running, 264 sleeping,   0 stopped,   0 zombie
> Cpu(s):  0.2%us,  0.1%sy,  0.0%ni, 99.2%id,  0.5%wa,  0.0%hi,  0.0%si,
>  0.0%st
> Mem:  12328624k total, 11382976k used,   945648k free,   123400k buffers
> Swap:  4882424k total,      860k used,  4881564k free,  7565012k cached
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>  2023 tomcat55  20   0  627m 184m 9344 S  333  1.5  32:00.47 jsvc
>  5396 root      20   0  832m 610m 9224 S  100  5.1  12:32.43 java
>    1 root      20   0 10316  760  624 S    0  0.0   0:33.14 init
>
> (where I presume that if tomcat is showing 333% CPU usage, it is because it
> is running on multiple cores; the second task visible above is the interface
> to the search engine).
>
> Anyway, my question is :
>
> Considering all the above, which would be the easiest/quickest way of
> starting to figure out what this tomcat is doing, and where the
> system/application bottleneck might be ?
>
> My preference would be in an easy tool to install and run, to first get a
> rough idea, and then maybe select more specific tools to examine one or the
> other area more in-depth.
> Or maybe I can just first add some command-line switches to the JVM running
> tomcat, to give me more information in the logs ?
>
> (My workstation is Windows XP, and I can install anything I want on it.)
>
> Additional details :
>
> Platform : (Linux 64-bit)
> # uname -a
> Linux vogon2 2.6.26-2-amd64 #1 SMP Thu Nov 25 04:30:55 UTC 2010 x86_64
> GNU/Linux
>
> Tomcat and Java :
>
> Using CATALINA_BASE:   /usr/share/tomcat5.5
> Using CATALINA_HOME:   /usr/share/tomcat5.5
> Using CATALINA_TMPDIR: /usr/share/tomcat5.5/temp
> Using JRE_HOME:       /usr/lib/jvm/java-6-sun
> Server version: Apache Tomcat/5.5
> Server built:   Oct 15 2008 12:57:44
> Server number:  5.5.26.0
> OS Name:        Linux
> OS Version:     2.6.26-2-amd64
> Architecture:   amd64
> JVM Version:    1.6.0_22-b04
> JVM Vendor:     Sun Microsystems Inc.
> vogon2:/usr/share/tomcat5.5/bin#
>
> Tomcat is started as :
> tomcat55  2023  2021  6 Apr11 ?        00:31:58 /usr/bin/jsvc -user tomcat55
> -cp
> /usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar
> -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat5.5.pid
> -Djava.awt.headless=true -Xms128M -Xmx128M
> -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed
> -Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5
> -Djava.io.tmpdir=/var/lib/tomcat5.5/temp
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties
> org.apache.catalina.startup.Bootstrap
>
> (which I don't think is a lot of heap space, which may be a problem here.
> But before I change it, I'd like to know why I change it; the server.xml
> settings are pretty much the standard issue, all defaults for threads
> etc..).
>
> Apache and mod_jk :
>
> Apache/2.2.9 (Debian) DAV/2 mod_jk/1.2.26 mod_apreq2-20051231/2.6.0
> mod_perl/2.0.4 Perl/v5.10.0 configured
>
> Thanks in advance for any recommendation
>
>
> 

Re: Simple Tomcat monitoring ?

2011-04-12 Thread Francis GALIEGUE
On Tue, Apr 12, 2011 at 12:20, André Warnier  wrote:
[...]
>
> Considering all the above, which would be the easiest/quickest way of
> starting to figure out what this tomcat is doing, and where the
> system/application bottleneck might be ?
>

We have the following tools, all very easy to setup and run:

* SNMP monitoring of the JVM (allows to see the amount of memory
consumed, the number of threads, and others - the MIB is well
defined);
* a shell script sending the results of a kill -3 on the JVM (a thread dump);
* a script which triggers when a java.lang.OutOfMemoryError is thrown.

If you are interested in any of it, I can tell you how we do it.

And, considering that your server has 12 GB RAM, you could indeed do
with a little more heap space!

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Simple Tomcat monitoring ?

2011-04-12 Thread André Warnier

Hi.

I have a Linux application server running Apache + mod_jk + tomcat 5.5 (I know that it is 
relatively old; and to compound the heresy, it is installed from a Debian package).

The hardware is quite OK (quad-core fast CPU, 12 GB RAM).

Apache is serving most of the static content, and passing some requests to Tomcat via AJP. 
 Tomcat runs basically a single application, but this webapp, although itself quite 
small, can be heavily used : it is an interface to a text retrieval system (a kind of 
database specialised for textual data), and some of the searches made by users can take 
several seconds to come back with results, which may themselves be several pages of data.


I can access the host remotely via SSH and via HTTP, and have full control of 
it.
But it is a productive customer server, so there are limits to what I can do.

I am having performance issues with that system : users at times complain that "they 
cannot access the application", and I see things like this in a "top" display :


top - 08:20:02 up 72 days,  9:39,  4 users,  load average: 6.83, 5.63, 3.16
Tasks: 265 total,   1 running, 264 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us,  0.1%sy,  0.0%ni, 99.2%id,  0.5%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  12328624k total, 11382976k used,   945648k free,   123400k buffers
Swap:  4882424k total,  860k used,  4881564k free,  7565012k cached

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 2023 tomcat55  20   0  627m 184m 9344 S  333  1.5  32:00.47 jsvc
 5396 root  20   0  832m 610m 9224 S  100  5.1  12:32.43 java
1 root  20   0 10316  760  624 S0  0.0   0:33.14 init

(where I presume that if tomcat is showing 333% CPU usage, it is because it is running on 
multiple cores; the second task visible above is the interface to the search engine).


Anyway, my question is :

Considering all the above, which would be the easiest/quickest way of starting to figure 
out what this tomcat is doing, and where the system/application bottleneck might be ?


My preference would be in an easy tool to install and run, to first get a rough idea, and 
then maybe select more specific tools to examine one or the other area more in-depth.
Or maybe I can just first add some command-line switches to the JVM running tomcat, to 
give me more information in the logs ?


(My workstation is Windows XP, and I can install anything I want on it.)

Additional details :

Platform : (Linux 64-bit)
# uname -a
Linux vogon2 2.6.26-2-amd64 #1 SMP Thu Nov 25 04:30:55 UTC 2010 x86_64 GNU/Linux

Tomcat and Java :

Using CATALINA_BASE:   /usr/share/tomcat5.5
Using CATALINA_HOME:   /usr/share/tomcat5.5
Using CATALINA_TMPDIR: /usr/share/tomcat5.5/temp
Using JRE_HOME:   /usr/lib/jvm/java-6-sun
Server version: Apache Tomcat/5.5
Server built:   Oct 15 2008 12:57:44
Server number:  5.5.26.0
OS Name:Linux
OS Version: 2.6.26-2-amd64
Architecture:   amd64
JVM Version:1.6.0_22-b04
JVM Vendor: Sun Microsystems Inc.
vogon2:/usr/share/tomcat5.5/bin#

Tomcat is started as :
tomcat55  2023  2021  6 Apr11 ?00:31:58 /usr/bin/jsvc -user tomcat55 -cp 
/usr/share/java/commons-daemon.jar:/usr/share/tomcat5.5/bin/bootstrap.jar -outfile SYSLOG 
-errfile SYSLOG -pidfile /var/run/tomcat5.5.pid -Djava.awt.headless=true -Xms128M -Xmx128M 
-Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed 
-Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 
-Djava.io.tmpdir=/var/lib/tomcat5.5/temp 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/var/lib/tomcat5.5/conf/logging.properties 
org.apache.catalina.startup.Bootstrap


(which I don't think is a lot of heap space, which may be a problem here. But before I 
change it, I'd like to know why I change it; the server.xml settings are pretty much the 
standard issue, all defaults for threads etc..).


Apache and mod_jk :

Apache/2.2.9 (Debian) DAV/2 mod_jk/1.2.26 mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 
Perl/v5.10.0 configured


Thanks in advance for any recommendation


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat monitoring using JMX

2011-01-06 Thread Pid
On 1/6/11 12:44 PM, Ziggy wrote:
> Hi,
> 
> I am using JMX to connect to a Tomcat instance and looking at attributes for
> a jdbc datasource as shown below.
> 
> MBeanServerConnection conn = jmxc.getMBeanServerConnection();
> ObjectName on = new
> ObjectName("Catalina:type=DataSource,path=/appdb,host=localhost,class=javax.sql.DataSource,name=\"jdbc/appdb\"");
> mbsc.getAttribute(on, "numIdle")
> 
> Is there an Mbean provided by Tomcat that can provide me the following
> information
> 
> - Whether Tomcat is running

Well you won't be able to connect to it to get the Bean if it's isn't.

> - Whether a specific web app running under a specific context is runnin

Catalina:type=WebModule,... etc

> - The health of the environment in general (tomcat, OS etc)

Define "health".

> - Whether a JNDI datasource is available and if possible how many active
> database connections there are and how many free.

You've already got the DataSource above, why not connect JConsole to
Tomcat and explore the other attributes?

> I have been google'ing around but the majority of the examples talk about
> writing your own Mbean and including it as part of the application. I am
> trying to write an external client utility that will monitor the application
> away from Tomcat.

JConsole?  VisualVM?


p

> Thanks
> 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Tomcat monitoring using JMX

2011-01-06 Thread Ziggy
Hi,

I am using JMX to connect to a Tomcat instance and looking at attributes for
a jdbc datasource as shown below.

MBeanServerConnection conn = jmxc.getMBeanServerConnection();
ObjectName on = new
ObjectName("Catalina:type=DataSource,path=/appdb,host=localhost,class=javax.sql.DataSource,name=\"jdbc/appdb\"");
mbsc.getAttribute(on, "numIdle")

Is there an Mbean provided by Tomcat that can provide me the following
information

- Whether Tomcat is running
- Whether a specific web app running under a specific context is runnin
- The health of the environment in general (tomcat, OS etc)
- Whether a JNDI datasource is available and if possible how many active
database connections there are and how many free.

I have been google'ing around but the majority of the examples talk about
writing your own Mbean and including it as part of the application. I am
trying to write an external client utility that will monitor the application
away from Tomcat.

Thanks


Re: Tomcat monitoring

2009-10-27 Thread Anurag Kapur
I have found Lamda Probe to be quite useful and easy to use for monitoring
the Tomcat container. http://www.lambdaprobe.org/

Simply deploy the probe war file to the container you want to monitor!

You can detect requests that have large processing times by monitoring the
connector status tab. This sometime comes in handy and is easier to use/read
than a raw log file.
http://www.lambdaprobe.org/d/screenshots/full/status.png

Having said that, as Chris mentioned in his reply, you can also enable the
required logging and have the information logged to relevant log files.

Cheers
Anurag


--
Anurag Kapur
Associate - Technology,
Sapient Corporation.

http://www.linkedin.com/in/anuragkapur

http://www.google.com/profiles/anuragkapur
--
Sent from Poplar, Greater London, United Kingdom

On Tue, Oct 27, 2009 at 8:41 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Mohamedin,
>
> On 10/24/2009 4:47 AM, Mohamedin wrote:
> > Please recommend a monitoring tool for tomcat. I am interested in
> > knowing the response time of each request and finding requests that
> > take a lot of time. In short I need to figure out the bottle nicks in
> > my site.
>
> It sounds like the AccessLogValve might suit your needs:
> http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html
>
> You probably want "%D" some place in your log pattern.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkrnWxAACgkQ9CaO5/Lv0PAX5QCdHXpAK7KuRBZcKIZNnxMsmNgN
> FJEAnRSwXjclYANWP6bQSj7pQq1Ew79h
> =45Y9
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat monitoring

2009-10-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mohamedin,

On 10/24/2009 4:47 AM, Mohamedin wrote:
> Please recommend a monitoring tool for tomcat. I am interested in
> knowing the response time of each request and finding requests that
> take a lot of time. In short I need to figure out the bottle nicks in
> my site.

It sounds like the AccessLogValve might suit your needs:
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html

You probably want "%D" some place in your log pattern.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrnWxAACgkQ9CaO5/Lv0PAX5QCdHXpAK7KuRBZcKIZNnxMsmNgN
FJEAnRSwXjclYANWP6bQSj7pQq1Ew79h
=45Y9
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat monitoring

2009-10-24 Thread André Warnier

Mohamedin wrote:

In short I need to figure out the bottle nicks in my site.

The word is "bottleneck".  With "neck" like the part between your 
shoulders and your head.  Bottle nick is cute though.  Hope you find him.

;-)


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat monitoring

2009-10-24 Thread Mohamedin
Dear All,

Please recommend a monitoring tool for tomcat. I am interested in knowing the 
response time of each request and finding requests that take a lot of time. In 
short I need to figure out the bottle nicks in my site.

Thanks a lot,
Mohamed Mohamedin

Re: Tomcat monitoring

2008-08-15 Thread Kees Jan Koster

Dear Tokajac,


As far as I see  http://www.zabbix.com http://www.zabbix.com  is not
available for WinXP (that's my platform).


*shrug* You could always run it on FreeBSD or Linux in VMWare.


I downloaded Zapcat. Can Zapcat be useful without zabbix?


No, it only works as a bridge to Zabbix. That's what it was designed  
to do.


Here is a discussion about some other tools that you can use to  
monitor your VM. http://java-monitor.com/forum/showthread.php?t=1  
There is also Zenoss and MC4J.


Hope this helps.
--
Kees Jan

http://java-monitor.com/forum/
[EMAIL PROTECTED]
06-51838192

Human beings make life so interesting. Do you know that in a universe  
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry  
Partchett



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat monitoring

2008-08-14 Thread Tokajac

Thanks for your answer Jan!


As far as I see  http://www.zabbix.com http://www.zabbix.com  is not
available for WinXP (that's my platform).
I downloaded Zapcat. Can Zapcat be useful without zabbix?

Any more advice for this situation?


Regards



-- 
View this message in context: 
http://www.nabble.com/Tomcat-monitoring-tp18963920p18992437.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat monitoring

2008-08-14 Thread Kees Jan Koster

Dear Tokajac,


I want to monitor performance of Tomcat server when I'm running an
application.

Memory usage, threads, objects, user sessions, sql queries and as
much as
possible of other information on server.


JMX is the way to go. JConsole was already suggested. If you want to
really monitor the performance of an application you also need
information from the actual host (disk I/O load, network load,
processor load, RAM fill level.

You should consider that tools such as JConsole only show data that is
gathered as long as JConsole is running. External monitoring tools
also allow you to gather information continuously, across reboots and
new software versions. That gives you the ability to 1) do long term
resource requirements prediction and 2) see what version of your
application introduced or solved the memory leak. :)

There are loads of tools out there that can do this. Personally, I use 
http://www.zabbix.com
, combined with the Zapcat JMX to Zabbix bridge 
(http://www.kjkoster.org/zapcat/Tomcat_How_To.html
).
--
Kees Jan

http://java-monitor.com/forum/
[EMAIL PROTECTED]
06-51838192

Human beings make life so interesting. Do you know that in a universe
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry
Partchett


RE: Tomcat monitoring

2008-08-13 Thread Tokajac

Thx for Your answer, Chuck ! 


So far, i've found lambdaprobe more useful. i'm still looking around.

Do U have any advice about SQL debug? 
I already have iBatis log and p6spy. Is there any other useful tool for
queries?


Regards
-- 
View this message in context: 
http://www.nabble.com/Tomcat-monitoring-tp18963920p18967324.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat monitoring

2008-08-13 Thread Caldarale, Charles R
> From: Tokajac [mailto:[EMAIL PROTECTED]
> Subject: Tomcat monitoring
>
> I want to monitor performance of Tomcat server when I'm running an
> application.

Start with these:
http://www.lambdaprobe.org
http://moskito.anotheria.net

You can also use JMX (e.g., JConsole) for much of the information, and there 
are numerous commercial products available.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat monitoring

2008-08-13 Thread Tokajac

I want to monitor performance of Tomcat server when I'm running an
application.

Memory usage, threads, objects, user sessions, sql queries and as much as
possible of other
information on server.

Where can i find tools for this?


Regards
-- 
View this message in context: 
http://www.nabble.com/Tomcat-monitoring-tp18963920p18963920.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat monitoring MBean help

2007-07-12 Thread Madhav Sathe

Hi,

Im using tomcat mbean for monitoring.
I have a questions regarding 'processingTime' attribute of Servlet and 
Manager Mbeans.


1. What value does it show - is it the last collected avg/total request 
processing time.
My observation is, this value keeps on going up. So not able to figure 
out what does it actually indicate for these Mbeans (Servlet and Manager)


2. what is the unit of 'processingTime' - my educated guess is 'ms'

3. JspMonitor mbean has attribute called jspCount. What does it indicate.

Regards,
Madhav

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Monitoring

2007-07-01 Thread Tim Lucia

> -Original Message-
> From: Angelov, Rossen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 27, 2007 12:56 PM
> To: Tomcat Users List
> Subject: Tomcat Monitoring
> 
> What is recommended for monitoring Tomcat? Or is there anything built in
> that can help monitoring the performance and the state of the thread
> pools?
> 
> More specifically, I'm trying to find a way to time how long it take
> from the moment a request was received and when the response was
> returned.

I have a suite of filters, one of which does exactly this.  Mixed in is a
display servlet which dumps out all requests, by URL including request
count, min, max and average request times.  PM me and I'll send it your way.

The main method looks like this, if you want to write your own:

/**
 * Process the container's filter request.
 * @param request - Request object
 * @param response - response object
 * @param chain - next filter in the chain.
 */
public void doFilter(ServletRequest request, ServletResponse response,
 FilterChain chain)
throws IOException, ServletException 
{
hitCount++;
HttpServletRequest httpRequest = (HttpServletRequest)request;
final String context = httpRequest.getContextPath();
String uri = httpRequest.getRequestURI();
uri = uri.substring(context.length());

URICount count = new URICount(uri, 1);
synchronized (pages) {
final int index = pages.indexOf(count);
if (index < 0) { 
pages.add(count);
}
else {
count = (URICount)pages.get(index);
count.increment();
}
}
lastRequest = new Date();
long t0 = System.currentTimeMillis();
chain.doFilter(request, response);
long t1 = System.currentTimeMillis();
final long requestTime = t1-t0;
count.addTotalTime(requestTime);
processingTime += requestTime;
maxProcessingTime = 
(requestTime > maxProcessingTime ? requestTime :
maxProcessingTime);

if (logger.isDebugEnabled()) {
logger.debug(uri + " in " + (t1-t0) + " ms");
}
}

Tim



> 
> Thanks,
> Ross
> 
> "This communication is intended solely for the addressee and is
> confidential and not for third party unauthorized distribution"
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Monitoring

2007-06-27 Thread Kirst Martin Wolfgang

> What is recommended for monitoring Tomcat? Or is there anything built
in
> that can help monitoring the performance and the state of the thread
> pools?

For general purpose use jconsole.exe from SUN's JDK.

> More specifically, I'm trying to find a way to time how long it take
> from the moment a request was received and when the response was
> returned.

Hmm, maybe it's better to use performance analyzer like the 
"Test and Performance Tools Platform" (a.k.a. TPTP) from Eclipse.

Regards
 Martin

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Monitoring

2007-06-27 Thread Leon Rosenberg

moskito.anotheria.net
and you are probably interested in the RequestURIFilter

http://moskito.anotheria.net/moskitodemo/mui/mskShowProducer?pProducerId=RequestURIFilter

regards
Leon


On 6/27/07, Angelov, Rossen <[EMAIL PROTECTED]> wrote:

What is recommended for monitoring Tomcat? Or is there anything built in
that can help monitoring the performance and the state of the thread
pools?

More specifically, I'm trying to find a way to time how long it take
from the moment a request was received and when the response was
returned.

Thanks,
Ross

"This communication is intended solely for the addressee and is confidential and not 
for third party unauthorized distribution"

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Monitoring

2007-06-27 Thread Angelov, Rossen
What is recommended for monitoring Tomcat? Or is there anything built in
that can help monitoring the performance and the state of the thread
pools?

More specifically, I'm trying to find a way to time how long it take
from the moment a request was received and when the response was
returned.

Thanks,
Ross

"This communication is intended solely for the addressee and is confidential 
and not for third party unauthorized distribution"

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat monitoring

2007-06-20 Thread Raffaele

Hi,
sorry for the intrusion...
could the number of active threads be retrieved also by code, invoking
direclty Tomcat API?

I'm using Embedded Tomcat.

Thanks, regards.
Raffaele


Leon Rosenberg-3 wrote:
> 
> there is probably no such thing as "best way"
> 
>>   - JVM Heap usage
> manager and lambdaprober
>>   - Number of active threads (if by active threads you mean current
>> requests)
> manager, lambdaprobe, moskito
>>   - JDBC connection pool stats
> lambdaprobe
>>   - Active thread list
> lambdaprobe, moskito (if by active threads you mean current requests)
>>   - Hits/Sec (running average)
> all of the above. However, running average is pretty useless, since
> after a week of running it won't change even if the hits doubled or
> halved. If you want the average in last 15 minutes or some other time
> interval go for moskito.
> 
> regards
> Leon
> 
> 
> 
> 
> 
> On 2/27/07, H H <[EMAIL PROTECTED]> wrote:
>> Does anyone know whats the best way to monitor a tomcat application
>> remotely - I have seen the mailing lists and there are some tools that
>> provide monitoring. However I need a way to programatically ping Tomcat
>> and collect performance statistics - Any language would do : perl/java, I
>> need to integrate the monitoring to another application. I am looking to
>> collect the foll stats:
>>
>>   - JVM Heap usage
>>   - Number of active threads
>>   - JDBC connection pool stats
>>   - Active thread list
>>   - Hits/Sec (running average)
>>
>>
>>
>>
>>
>>
>>
>> -
>> TV dinner still cooling?
>> Check out "Tonight's Picks" on Yahoo! TV.
> 
> ---------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-monitoring-tf3298623.html#a11214779
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat monitoring

2007-02-27 Thread Tim Lucia


> -Original Message-
> From: H H [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 27, 2007 1:12 AM
> To: users@tomcat.apache.org
> Subject: Tomcat monitoring
> 
> Does anyone know whats the best way to monitor a tomcat application
> remotely - I have seen the mailing lists and there are some tools that
> provide monitoring. However I need a way to programatically ping Tomcat
> and collect performance statistics - Any language would do : perl/java, I
> need to integrate the monitoring to another application. I am looking to
> collect the foll stats:
> 
>   - JVM Heap usage
>   - Number of active threads
>   - JDBC connection pool stats
>   - Active thread list

Most of these are available in some for from /manager/status, or via JMX.  I
have written a few Perl scripts to feed them into MRTG.

>   - Hits/Sec (running average)

I have a filter which collects this particular statistic.  

Mail me off-list if you want a copy of any of these items...

Tim

> 
> 
> 
> 
> 
> 
> 
> -
> TV dinner still cooling?
> Check out "Tonight's Picks" on Yahoo! TV.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat monitoring

2007-02-27 Thread Leon Rosenberg

there is probably no such thing as "best way"


  - JVM Heap usage

manager and lambdaprober

  - Number of active threads (if by active threads you mean current requests)

manager, lambdaprobe, moskito

  - JDBC connection pool stats

lambdaprobe

  - Active thread list

lambdaprobe, moskito (if by active threads you mean current requests)

  - Hits/Sec (running average)

all of the above. However, running average is pretty useless, since
after a week of running it won't change even if the hits doubled or
halved. If you want the average in last 15 minutes or some other time
interval go for moskito.

regards
Leon





On 2/27/07, H H <[EMAIL PROTECTED]> wrote:

Does anyone know whats the best way to monitor a tomcat application remotely - 
I have seen the mailing lists and there are some tools that provide monitoring. 
However I need a way to programatically ping Tomcat and collect performance 
statistics - Any language would do : perl/java, I need to integrate the 
monitoring to another application. I am looking to collect the foll stats:

  - JVM Heap usage
  - Number of active threads
  - JDBC connection pool stats
  - Active thread list
  - Hits/Sec (running average)







-
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat monitoring

2007-02-26 Thread H H
Does anyone know whats the best way to monitor a tomcat application remotely - 
I have seen the mailing lists and there are some tools that provide monitoring. 
However I need a way to programatically ping Tomcat and collect performance 
statistics - Any language would do : perl/java, I need to integrate the 
monitoring to another application. I am looking to collect the foll stats:
   
  - JVM Heap usage
  - Number of active threads
  - JDBC connection pool stats
  - Active thread list
  - Hits/Sec (running average)
   
   
   
   
   

 
-
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.

Re: Tomcat monitoring

2006-08-25 Thread Rafael . Almeida
Hi Bruno;
 We have already installed Hyperic and it looks good. I will take a look 
on these too. Thanks a lot!

Rafael Sarres de Almeida
Seção de Gerenciamento de Rede
Superior Tribunal de Justiça
Tel: (61) 3319-9342





Bruno Georges <[EMAIL PROTECTED]> 
25/08/2006 04:51
Favor responder a
"Tomcat Users List" 


Para
"Tomcat Users List" 
cc
"Tomcat Users List" 
Assunto
Re: Tomcat monitoring






Rafael

I forgot to mention that JBoss provides JBoss Operations Network which 
uses
agent to collect metrics no the machine where you deployed your Tomcat
instance. You can access it via  a web front-end and monitor your
apache/tomcat/jboss instances. There is a lot more they support, I suggest
you look at:
http://www.jboss.com/resources/jbon_demos

There is also JProbe [used to be a sitraka's product], now you can get it
from Quest. It is fairly intrusive.
You also have JProfiler and YourKit.
Most of these support JVMPI and some JVMPI.

Use Java 5, it will provide more hooks for profiling your JVM. [along with
JVMTI support]

Hopes this helps.

With Best Regards
Bruno Georges

Glencore International AG
Tel. +41 41 709 3204
Fax +41 41 709 3000


|-+--->
| |   [EMAIL PROTECTED]|
| |   tj.gov.br   |
| |   |
| |   24.08.06 18:40  |
| |   Please respond  |
| |   to "Tomcat Users|
| |   List"   |
| |   |
|-+--->
 
>--|
  | |
  |To:  "Tomcat Users List"   
     |
  |cc:|
  |Subject: Tomcat monitoring|
  | |
  |Distribute:|
  |Personal?   |---|   |
  || [ ] x |   |
  ||---|   |
  | |
 
>--|




Hi;
I attended to an Oracle IAS event and they presented their Enterprise
Manager 10g, and they showed some great monitoring capabilities. Here I
quote some of them from their document
"http://www.oracle.com/technology/products/oem/pdf/wp_aslm_10g.pdf":

"The tracing functionality provides an on-demand tool that lets
administrators examine in detail all invocation paths of a transaction,
and isolate the exact tier and location of a problem. All invocation paths
of a transaction are traced and hierarchically broken down by servlet/JSP,
EJB, JDBC/SQL times. Further drill-downs into each component identify
response time breakouts by invocation path. Click-to-SQL drill-downs allow
administrators to navigate down from a transaction view and examine the
underlying SQL statements." (Page 6)

"URL processing time and load activity graphs provide administrators with
information on the impact of server activity on response times." (Page 7)

"Enterprise Manager provides correlation of CPU utilization, memory, and
I/O usage of all Web application components to help administrators
determine where resources are constrained." (Page 8)


Well, my question is if there is any way to do such (or any) monitoring
with Tomcat 5.5.17. If not, is there any monitoring tool that you guys use
to monitor and troubleshoot Tomcat? Maybe just tomcat/java commands that
shows status/monitoring info. Actually we only graph URL response times
and load keep an eye on the logs.
Any info is welcome.
Thanks a lot.

Rafael Sarres de Almeida
Seção de Gerenciamento de Rede
Superior Tribunal de Justiça
Tel: (61) 3319-9342






LEGAL DISCLAIMER. The contents of this e-mail and any attachments are 
strictly
confidential and they may not be used or disclosed by someone who is not a
named recipient.
If you have received this email in error please notify the sender by 
replying
to this email inserting the word "misdirected" as the message and delete 
this
e-mail from your system.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat monitoring

2006-08-25 Thread Bruno Georges
Rafael

I forgot to mention that JBoss provides JBoss Operations Network which uses
agent to collect metrics no the machine where you deployed your Tomcat
instance. You can access it via  a web front-end and monitor your
apache/tomcat/jboss instances. There is a lot more they support, I suggest
you look at:
http://www.jboss.com/resources/jbon_demos

There is also JProbe [used to be a sitraka's product], now you can get it
from Quest. It is fairly intrusive.
You also have JProfiler and YourKit.
Most of these support JVMPI and some JVMPI.

Use Java 5, it will provide more hooks for profiling your JVM. [along with
JVMTI support]

Hopes this helps.

With Best Regards
Bruno Georges

Glencore International AG
Tel. +41 41 709 3204
Fax +41 41 709 3000


|-+--->
| |   [EMAIL PROTECTED]|
| |   tj.gov.br   |
| |   |
| |   24.08.06 18:40  |
| |   Please respond  |
| |   to "Tomcat Users|
| |   List"   |
| |   |
|-+--->
  
>--|
  | 
 |
  |To:  "Tomcat Users List"
 |
  |cc:  
     |
  |Subject: Tomcat monitoring   
 |
  | 
 |
  |Distribute:  
 |
  |Personal?   |---|
 |
  || [ ] x |
 |
  ||---|
 |
  | 
 |
  
>--|




Hi;
I attended to an Oracle IAS event and they presented their Enterprise
Manager 10g, and they showed some great monitoring capabilities. Here I
quote some of them from their document
"http://www.oracle.com/technology/products/oem/pdf/wp_aslm_10g.pdf":

"The tracing functionality provides an on-demand tool that lets
administrators examine in detail all invocation paths of a transaction,
and isolate the exact tier and location of a problem. All invocation paths
of a transaction are traced and hierarchically broken down by servlet/JSP,
EJB, JDBC/SQL times. Further drill-downs into each component identify
response time breakouts by invocation path. Click-to-SQL drill-downs allow
administrators to navigate down from a transaction view and examine the
underlying SQL statements." (Page 6)

"URL processing time and load activity graphs provide administrators with
information on the impact of server activity on response times." (Page 7)

"Enterprise Manager provides correlation of CPU utilization, memory, and
I/O usage of all Web application components to help administrators
determine where resources are constrained." (Page 8)


Well, my question is if there is any way to do such (or any) monitoring
with Tomcat 5.5.17. If not, is there any monitoring tool that you guys use
to monitor and troubleshoot Tomcat? Maybe just tomcat/java commands that
shows status/monitoring info. Actually we only graph URL response times
and load keep an eye on the logs.
Any info is welcome.
Thanks a lot.

Rafael Sarres de Almeida
Seção de Gerenciamento de Rede
Superior Tribunal de Justiça
Tel: (61) 3319-9342






LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly
confidential and they may not be used or disclosed by someone who is not a
named recipient.
If you have received this email in error please notify the sender by replying
to this email inserting 

Re: Tomcat monitoring

2006-08-24 Thread Rafael . Almeida
Thanks a lot. I will look this one too.

Rafael Sarres de Almeida
Seção de Gerenciamento de Rede
Superior Tribunal de Justiça
Tel: (61) 3319-9342





Andrés González <[EMAIL PROTECTED]> 
24/08/2006 14:15
Favor responder a
"Tomcat Users List" 


Para
Tomcat Users List 
cc

Assunto
Re: Tomcat monitoring






Another option:

http://www.hyperic.com/products/managed/tomcat-management.htm

El jue, 24-08-2006 a las 13:40 -0300, [EMAIL PROTECTED]
escribió:
> Hi;
> I attended to an Oracle IAS event and they presented their Enterprise 
> Manager 10g, and they showed some great monitoring capabilities. Here I 
> quote some of them from their document 
> "http://www.oracle.com/technology/products/oem/pdf/wp_aslm_10g.pdf":
> 
> "The tracing functionality provides an on-demand tool that lets 
> administrators examine in detail all invocation paths of a transaction, 
> and isolate the exact tier and location of a problem. All invocation 
paths 
> of a transaction are traced and hierarchically broken down by 
servlet/JSP, 
> EJB, JDBC/SQL times. Further drill-downs into each component identify 
> response time breakouts by invocation path. Click-to-SQL drill-downs 
allow 
> administrators to navigate down from a transaction view and examine the 
> underlying SQL statements." (Page 6)
> 
> "URL processing time and load activity graphs provide administrators 
with 
> information on the impact of server activity on response times." (Page 
7)
> 
> "Enterprise Manager provides correlation of CPU utilization, memory, and 

> I/O usage of all Web application components to help administrators 
> determine where resources are constrained." (Page 8)
> 
> 
> Well, my question is if there is any way to do such (or any) monitoring 
> with Tomcat 5.5.17. If not, is there any monitoring tool that you guys 
use 
> to monitor and troubleshoot Tomcat? Maybe just tomcat/java commands that 

> shows status/monitoring info. Actually we only graph URL response times 
> and load keep an eye on the logs.
> Any info is welcome.
> Thanks a lot.
> 
> Rafael Sarres de Almeida
> Seção de Gerenciamento de Rede
> Superior Tribunal de Justiça
> Tel: (61) 3319-9342
> 
> 
-- 
Andrés González - Programación y sistemas
Publicinet (Publicidad-Cine-Internet, S.L.)
Urzaiz, 71, entlo, izda. -- 36204 Vigo
Telf 902.014.606 -- http://www.mensario.com



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat monitoring

2006-08-24 Thread Rafael . Almeida
Thanks, looks good. 

Rafael Sarres de Almeida
Seção de Gerenciamento de Rede
Superior Tribunal de Justiça
Tel: (61) 3319-9342





Dhaval Patel <[EMAIL PROTECTED]> 
24/08/2006 14:07
Favor responder a
"Tomcat Users List" 


Para
Tomcat Users List 
cc

Assunto
Re: Tomcat monitoring






http://www.lambdaprobe.org


--- [EMAIL PROTECTED] wrote:

> Hi;
> I attended to an Oracle IAS event and they presented their Enterprise 
> Manager 10g, and they showed some great monitoring capabilities. Here I 
> quote some of them from their document 
> "http://www.oracle.com/technology/products/oem/pdf/wp_aslm_10g.pdf":
> 
> "The tracing functionality provides an on-demand tool that lets 
> administrators examine in detail all invocation paths of a transaction, 
> and isolate the exact tier and location of a problem. All invocation 
paths 
> of a transaction are traced and hierarchically broken down by 
servlet/JSP, 
> EJB, JDBC/SQL times. Further drill-downs into each component identify 
> response time breakouts by invocation path. Click-to-SQL drill-downs 
allow 
> administrators to navigate down from a transaction view and examine the 
> underlying SQL statements." (Page 6)
> 
> "URL processing time and load activity graphs provide administrators 
with 
> information on the impact of server activity on response times." (Page 
7)
> 
> "Enterprise Manager provides correlation of CPU utilization, memory, and 

> I/O usage of all Web application components to help administrators 
> determine where resources are constrained." (Page 8)
> 
> 
> Well, my question is if there is any way to do such (or any) monitoring 
> with Tomcat 5.5.17. If not, is there any monitoring tool that you guys 
use 
> to monitor and troubleshoot Tomcat? Maybe just tomcat/java commands that 

> shows status/monitoring info. Actually we only graph URL response times 
> and load keep an eye on the logs.
> Any info is welcome.
> Thanks a lot.
> 
> Rafael Sarres de Almeida
> Seção de Gerenciamento de Rede
> Superior Tribunal de Justiça
> Tel: (61) 3319-9342
> 
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tomcat monitoring

2006-08-24 Thread Andrés González
Another option:

http://www.hyperic.com/products/managed/tomcat-management.htm

El jue, 24-08-2006 a las 13:40 -0300, [EMAIL PROTECTED]
escribió:
> Hi;
> I attended to an Oracle IAS event and they presented their Enterprise 
> Manager 10g, and they showed some great monitoring capabilities. Here I 
> quote some of them from their document 
> "http://www.oracle.com/technology/products/oem/pdf/wp_aslm_10g.pdf":
> 
> "The tracing functionality provides an on-demand tool that lets 
> administrators examine in detail all invocation paths of a transaction, 
> and isolate the exact tier and location of a problem. All invocation paths 
> of a transaction are traced and hierarchically broken down by servlet/JSP, 
> EJB, JDBC/SQL times. Further drill-downs into each component identify 
> response time breakouts by invocation path. Click-to-SQL drill-downs allow 
> administrators to navigate down from a transaction view and examine the 
> underlying SQL statements." (Page 6)
> 
> "URL processing time and load activity graphs provide administrators with 
> information on the impact of server activity on response times." (Page 7)
> 
> "Enterprise Manager provides correlation of CPU utilization, memory, and 
> I/O usage of all Web application components to help administrators 
> determine where resources are constrained." (Page 8)
> 
> 
> Well, my question is if there is any way to do such (or any) monitoring 
> with Tomcat 5.5.17. If not, is there any monitoring tool that you guys use 
> to monitor and troubleshoot Tomcat? Maybe just tomcat/java commands that 
> shows status/monitoring info. Actually we only graph URL response times 
> and load keep an eye on the logs.
> Any info is welcome.
> Thanks a lot.
> 
> Rafael Sarres de Almeida
> Seção de Gerenciamento de Rede
> Superior Tribunal de Justiça
> Tel: (61) 3319-9342
> 
> 
-- 
Andrés González - Programación y sistemas
Publicinet (Publicidad-Cine-Internet, S.L.)
Urzaiz, 71, entlo, izda. -- 36204 Vigo
Telf 902.014.606 -- http://www.mensario.com



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat monitoring

2006-08-24 Thread Dhaval Patel
http://www.lambdaprobe.org


--- [EMAIL PROTECTED] wrote:

> Hi;
> I attended to an Oracle IAS event and they presented their Enterprise 
> Manager 10g, and they showed some great monitoring capabilities. Here I 
> quote some of them from their document 
> "http://www.oracle.com/technology/products/oem/pdf/wp_aslm_10g.pdf":
> 
> "The tracing functionality provides an on-demand tool that lets 
> administrators examine in detail all invocation paths of a transaction, 
> and isolate the exact tier and location of a problem. All invocation paths 
> of a transaction are traced and hierarchically broken down by servlet/JSP, 
> EJB, JDBC/SQL times. Further drill-downs into each component identify 
> response time breakouts by invocation path. Click-to-SQL drill-downs allow 
> administrators to navigate down from a transaction view and examine the 
> underlying SQL statements." (Page 6)
> 
> "URL processing time and load activity graphs provide administrators with 
> information on the impact of server activity on response times." (Page 7)
> 
> "Enterprise Manager provides correlation of CPU utilization, memory, and 
> I/O usage of all Web application components to help administrators 
> determine where resources are constrained." (Page 8)
> 
> 
> Well, my question is if there is any way to do such (or any) monitoring 
> with Tomcat 5.5.17. If not, is there any monitoring tool that you guys use 
> to monitor and troubleshoot Tomcat? Maybe just tomcat/java commands that 
> shows status/monitoring info. Actually we only graph URL response times 
> and load keep an eye on the logs.
> Any info is welcome.
> Thanks a lot.
> 
> Rafael Sarres de Almeida
> Seção de Gerenciamento de Rede
> Superior Tribunal de Justiça
> Tel: (61) 3319-9342
> 
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat monitoring

2006-08-24 Thread Rafael . Almeida
Hi;
I attended to an Oracle IAS event and they presented their Enterprise 
Manager 10g, and they showed some great monitoring capabilities. Here I 
quote some of them from their document 
"http://www.oracle.com/technology/products/oem/pdf/wp_aslm_10g.pdf":

"The tracing functionality provides an on-demand tool that lets 
administrators examine in detail all invocation paths of a transaction, 
and isolate the exact tier and location of a problem. All invocation paths 
of a transaction are traced and hierarchically broken down by servlet/JSP, 
EJB, JDBC/SQL times. Further drill-downs into each component identify 
response time breakouts by invocation path. Click-to-SQL drill-downs allow 
administrators to navigate down from a transaction view and examine the 
underlying SQL statements." (Page 6)

"URL processing time and load activity graphs provide administrators with 
information on the impact of server activity on response times." (Page 7)

"Enterprise Manager provides correlation of CPU utilization, memory, and 
I/O usage of all Web application components to help administrators 
determine where resources are constrained." (Page 8)


Well, my question is if there is any way to do such (or any) monitoring 
with Tomcat 5.5.17. If not, is there any monitoring tool that you guys use 
to monitor and troubleshoot Tomcat? Maybe just tomcat/java commands that 
shows status/monitoring info. Actually we only graph URL response times 
and load keep an eye on the logs.
Any info is welcome.
Thanks a lot.

Rafael Sarres de Almeida
Seção de Gerenciamento de Rede
Superior Tribunal de Justiça
Tel: (61) 3319-9342




Re: Tomcat Monitoring

2006-07-12 Thread Mark Thomas
When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. To many of the list archiving services and mail clients
used by list subscribers this  makes your new message appear as part
of the old thread. This makes it harder for other users to find
relevant information when searching the lists.

This is known as thread hijacking and is behaviour that is frowned
upon on this list. Frequent offenders will be removed from the list.
It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.

The correct procedure is to create a new message with a new subject.
This will start a new thread.

Mark
tomcat-user-owner

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Monitoring

2006-07-12 Thread Leon Rosenberg

please define monitoring.
which data do you want to get? do you want to monitor your production
webapps status? monitor your hits? availability?
leon


On 7/12/06, Mr Alireza Fattahi <[EMAIL PROTECTED]> wrote:

Hi,

We are using Tomcat 5.5, please let us know if there are any monitoring tools 
that we can use with this server.
We found Lambda Probe mentioned in the posts.
Are there any built-in tools, or can we find some open sources for this issue?!




~Regards,
~~Alireza Fattahi

-
 All New Yahoo! Mail – Tired of [EMAIL PROTECTED]@! come-ons? Let our SpamGuard 
protect you.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Monitoring

2006-07-12 Thread Mr Alireza Fattahi
Hi,

We are using Tomcat 5.5, please let us know if there are any monitoring tools 
that we can use with this server.
We found Lambda Probe mentioned in the posts. 
Are there any built-in tools, or can we find some open sources for this issue?!




~Regards,
~~Alireza Fattahi

-
 All New Yahoo! Mail – Tired of [EMAIL PROTECTED]@! come-ons? Let our SpamGuard 
protect you.