-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Mihamina,
On 6/10/13 7:12 AM, Mihamina Rakotomandimby wrote: > I have one Tomcat instance, which has several applications > (containers) Note: these are not "containers" (at least not in any spec-recognized way). Tomcat is the container, the webapps are called "contexts" -- or just webapps usually. > On my installation, when Tomcat is running, only "java" process > owned by "tomcat" is listed. > > When the "java" process gets 100% CPU, I would like to be able to > differentiate which application is it about. You can only do this by taking a series of thread-dumps (maybe 1 every 5 seconds for 15 or 20 seconds) and comparing them to each other. You can probably find out which threads are doing a lot of work (because they are running a lot of code over the time period) and which applications are being used (because of the content of the stack traces). Of course, you have to have a way to detect "high" CPU usage (100% probably isn't good enough) and then trigger these thread dumps, etc. > One solution, for me, is to be able to run one java process per > war under a (pre-created) system user. I would like to keep only > one Tomcat instance. You can have one of these, but not both. You *can* have a single Tomcat /installation/ and multiple instances, of course (read the RUNNING.txt file that comes with the Tomcat bundle under the "Advanced" section). Remember: memory is cheap. It's not that costly to run multiple Tomcat instances. Tomcat requires roughly 12MiB on my system (64-bit with compressed OOPs) with no web applications deployed into it. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRtd80AAoJEBzwKT+lPKRYoNgP/3Yxsoq8aVnxwQi68goc84+L GI9+yka4VMzPYocTiNWkB57f6W3+/8xmict+9TnG+zuD+vuMyk/wzPjEFxJ0DB8B d2yUIjdpIbdomDGppiHgvFWzFyOx+9LnSD/+uouMXhpIOKBxmV8SHXHmp+pjM2pj o7RKdsOTItLG6DBUu4oMDfpac0/BAFcpm5H1AncJA+t3N76yVlR/euLQXQQ4dkL4 pYMEz3+P9NDLrq83mAy/tECumr9lkMDVj06D69leuoKTHjPOiGz45yf1UMT97iZ8 4061Vouk54IXuBeNqa3jW/HazoaWPLd35wAwchXA5+lFx3Zv7TTMjhPdh6s6YzjC nzQ8jok17lWG0xLq7m3iMoBYpkaJuKeF/1O0R+q5PCnSxJmEf1lvMxhe03v+O+f3 REB3kc76Iv+gwyo+zjbdXisbUNzbcL+SPRCiUW/aW+eQ5k0JRonPO401RSrrhdka 5FqfFd5DYVvDVnjw/AeQ9WEQxPI50h12ZpeFIF4AyDKMBiOcsLwzYr3AyF5KdBZH duy7TAv9KhZQQ77p66B20T5+XSV4qN7OIQ1nnvHkSjvuw7Jo/WSTgNNJqFo/Ctl0 DQuxvjrimVgphYDZYXKRponZTVvtgMx8m2QVzFlOb2cyV1LnZuyERzkzJ81hOhrz ZhJQoh2OJ+sQnoJXWNpD =NF3A -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org