Web Container (*): Tomcat configuration Monitoring

Source: Internet
Author: User

1. Tomcat directory structure

Tomcat is typically used for Java applications, and Apache is typically used for PHP

Bin folder (startup file):

Configuration monitoring and the like is in the catalina.sh

Conf folder (config file):

2, server.xml configuration file description

<server port= "8005" shutdown= "shutdown" >→shutdown command port number

<connector port= "8080" protocol= "http/1.1" → The port number of the connection is 8080
connectiontimeout= "20000" → connection time-out 20s
redirectport= "8443"/>

<executor name= "Tomcatthreadpool" nameprefix= "catalina-exec-" → set up the tomcat thread pool
Maxthreads= "minsparethreads=" 4 "/>

<connector executor= "Tomcatthreadpool" → introducing the tomcat thread pool
port= "8080" protocol= "http/1.1"
connectiontimeout= "20000"
redirectport= "8443"/>

<engine name= "Catalina" defaulthost= "localhost" >→ engine name

Unpackwars= "true" autodeploy= "true" >

3, tomcat-users.xml configuration file description

Start Tomcat

[Email protected] bin]# pwd
/usr/local/myfiles/apache-tomcat-8.5.15/bin
[Email protected] bin]# sh startup.sh && tail-f. /logs/catalina.out

Such as:

Click Server Status:

In the tomcat-users.xml in the/usr/local/myfiles/apache-tomcat-8.5.15/conf directory, add:

<role rolename= "Manager-gui"/><user username= "Tomcat" password= "S3cret" roles= "Manager-gui"/>

Restart Tomcat, Access http://192.168.20.129:8080/

Log on to the Server Status page to monitor the state of the JVM and the thread pool:

http-bio-8080 Bar (thread state):

Max thread→ Max Threads

Processing time→ Total processing time

P: Waiting request, equivalent to waiting status

S: Working status

F: Completion status

R: Ready state

K: Long Connection

Web Container (*): Tomcat configuration Monitoring

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.