Tough Tomcat comes with func¬tionality through which its admin¬istrator can monitor and manage various deployed Web applications as well as access the JMX beans and performance logs, the information gained through these logs and beans is hard to read and interpret. If a Tomcat administrator wishes to have the JVM Gava Virtual Machine ) or the datasource usage information, he will get the information but in a very crude format. Now imagine if he gets the same information about JVM memory usage in a graphical forma t rather than just crude n urn bers, he would be able to interpret the information easily and it would help him take steps to avoid any memory leak.
Lambda Probe is one such Open Source tool that helps in effective monitoring and administering of the Tomcat Web applica¬tion server. In this article we will explore various features of Lambda Probe through which various Tomcat runtime parameters can be monitored easily which otherwise are ignored because of the complexity to access and interpret them.
The Lambda Probe is a Java Web applica¬tion archive (WAR) and is available for download as a Zipped me from the site¬lambdaprobe.org. Once Lambda Probe has been downloaded, you can install the ex¬tracted probe. war file onto the Tomcat Web application server either through the Tom¬eat's manager application or by placing the file in Tomcat's Web apps directory for de¬ployment. The Lambda Probe application will get deployed on the Tomcat server. To access the Web application navigate to the URL. where <PORT> is the port number on which the Tomcat server is configured to run (in our case, 80). Before using the Probe Web application, we will have to cre¬ate new security roles for Lambda Probe. Tomcat's roles are configured through tomcat-user.xml file. The roles to be de¬clared are manager, poweruser, poweruser¬plus. and probeuser.
The role of 'manager' is same as required byTomcatManager and provides full access to Lambda Probe functionality. While the roles of poweruser and poweruserplus are having few privileges re¬stricted. and the role of probe user is least privileged haVing just access to read-only functionalities. While making changes to tomcat-user.xml file make sure that the user tomcat is assigned the role of manager. The following code snippet defines all four roles for the Lambda probe to work on Tomcat server.
<role rolename-"manager"/> <role role¬name-"tomcat"/> <role rolename="poweruser"/> <role role¬name-"rolel "/> <role rolename-"poweruserplus"/> <role role¬name-"probeuser"/> <user username-"both" password-"tomcat" roles-"tomcat,rolel" /> <user user-
name-"tomcat" password-"tomcat" roles-"tomcat. ma nager.
poweruser, poweruserplus, probeuser"j> <user username-"rolel" password-"tom¬cat" roles="rolel"j> ployed applications on the server and their status with information like number of ses¬sions, total number of servlets req uests, etc. Through the navigation tab, the user can access other features like datasource moni¬toring, deployment of Web apps. system in¬formation, etc. Among these features data source monitoring, JVM memory in¬spection, and session inspection would be helpful to an administrator in charge of monitoring and maintaining the Tomcat server. For every Tomcat administrator the datasource pool utilization and its optimal performance is a major concern. In a pro¬duction scenario a deployed application can crash if its allocated database connection pool gets exhausted. Lambda Probe comes handy here forTomcatadmins with its intu¬itive data source monitoring feature, which represents each application's utilization of pooled database connection in a graphical
Now after doing the necessary changes restart the server and access the Lambda Probe application after supplying the username and password. When you navigate to the URL of the Probe application, it presents a list of all the de. Another feature is of 'Group by JDBC URL.' which helps in seeing how many total connections are being utilized actually by any given deployed application. This partic¬ular information can help administrator to predict how many client connections are al¬lowed by the database. The Memory Utiliza¬tion feature can be found under System Information tab. This system information tab displays the summarized information of memory, as. and container information along with option to force garbage collec¬tion if the memory utilization has increased to higher side. Sometimes end users are shown blank screens or 'Page Not Found' errors.
which oc¬cur because of OutOfMemoryex. The JVM has an elaborate memory management that manages the working memory allocated to Java processes. Lambda Probe gives the adminis¬trator this JVM management like facility through Memory Utilization option. This helps the administrator to process and pre¬dict situations where the memory leaks may occur and hence prevent an application crash. This functionality represents the real¬time JVM memory space data (PermGen, CodeCache, etc) in a graphical format. As this information is accessed through JMX Qava Management Extensions), you will have to enable the JMX to get this informa¬tion displayed through Lambda Probe. This can be done by adding the JAVA_OPTS vari¬able to the catalina. bat file. The following code line enables the JMX for Tomcat.
set JAVA_OPTS-OfoJAVA_OPTSOfo-Dcom.-su n. ma nage ment.j mxremote Besides monitoring real-time Tomcat pa¬rameters, Lambda Probe application also provides options to view the logs on real¬time basis, to see what and where the prob¬lem has occurred. Also the app deployer facility is handy to directly deploy the Web archive applications through the Probe.
Through Lambda Probe, a Tomcat adminis¬trator can effectively monitor the produc¬tion server environment where the situations like memory shortage for Tomcat apps, or sessions expiring before user's re¬quest. etc. can be averted beforehand.



Reply With Quote
Bookmarks