1. 程式人生 > >tomcat 日誌目錄 介紹

tomcat 日誌目錄 介紹

 

 

[[email protected] tomcat]# ll
總用量 144
drwxr-x---. 2 root root  4096 11月 15 02:29 bin
-rw-r-----. 1 root root 19539 11月  4 01:42 BUILDING.txt
drwx------. 3 root root  4096 11月 15 02:47 conf
-rw-r-----. 1 root root  6090 11月  4 01:42 CONTRIBUTING.md
drwxr-x---. 2 root root  4096 11月 15 02
:29 lib -rw-r-----. 1 root root 57092 11月 4 01:42 LICENSE drwxr-x---. 2 root root 4096 11月 15 02:47 logs -rw-r-----. 1 root root 1726 11月 4 01:42 NOTICE -rw-r-----. 1 root root 3255 11月 4 01:42 README.md -rw-r-----. 1 root root 7142 11月 4 01:42 RELEASE-NOTES -rw-r-----. 1 root root 16262 11月 4 01:42
RUNNING.txt drwxr-x---. 2 root root 4096 11月 15 02:29 temp drwxr-x---. 7 root root 4096 11月 4 01:39 webapps drwxr-x---. 3 root root 4096 11月 15 02:47 work [[email protected] tomcat]# cd logs/ [[email protected] logs]# ls catalina.2018-11-15.log host-manager.2018-11-15.log localhost_access_log.2018
-11-15.txt catalina.out localhost.2018-11-15.log manager.2018-11-15.log

 

localhost開頭日誌都是tomcat訪問日誌

 

→tomcat實時日誌

重啟tomcat 

[[email protected] logs]# /usr/local/tomcat/bin/shutdown.sh 
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/local/java/jdk1.8
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar

[[email protected] logs]# /usr/local/tomcat/bin/startup.sh 
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/local/java/jdk1.8
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
[[email protected] logs]# tail -f catalina.out 
15-Nov-2018 02:47:06.539 資訊 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
15-Nov-2018 02:47:06.562 資訊 [main] org.apache.catalina.startup.Catalina.start Server startup in 3189 ms
14-Nov-2018 19:46:07.331 資訊 [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
14-Nov-2018 19:46:07.334 資訊 [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
14-Nov-2018 19:46:07.440 資訊 [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
14-Nov-2018 19:46:07.441 資訊 [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
14-Nov-2018 19:46:07.880 資訊 [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
14-Nov-2018 19:46:07.926 資訊 [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
14-Nov-2018 19:46:07.991 資訊 [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
14-Nov-2018 19:46:07.997 資訊 [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
14-Nov-2018 19:46:17.119 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.35
14-Nov-2018 19:46:17.222 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Nov 3 2018 17:39:20 UTC
14-Nov-2018 19:46:17.222 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.35.0
14-Nov-2018 19:46:17.222 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
14-Nov-2018 19:46:17.222 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            2.6.32-358.el6.x86_64
14-Nov-2018 19:46:17.222 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
14-Nov-2018 19:46:17.223 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/local/java/jdk1.8/jre
14-Nov-2018 19:46:17.223 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_191-b12
14-Nov-2018 19:46:17.225 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
14-Nov-2018 19:46:17.226 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
14-Nov-2018 19:46:17.229 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
14-Nov-2018 19:46:17.229 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
14-Nov-2018 19:46:17.234 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
14-Nov-2018 19:46:17.237 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
14-Nov-2018 19:46:17.239 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
14-Nov-2018 19:46:17.240 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
14-Nov-2018 19:46:17.240 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
14-Nov-2018 19:46:17.240 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
14-Nov-2018 19:46:17.242 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
14-Nov-2018 19:46:17.242 資訊 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
14-Nov-2018 19:46:17.245 資訊 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
14-Nov-2018 19:46:18.803 資訊 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
14-Nov-2018 19:46:18.999 資訊 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
14-Nov-2018 19:46:19.152 資訊 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
14-Nov-2018 19:46:19.163 資訊 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
14-Nov-2018 19:46:19.170 資訊 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 4771 ms
14-Nov-2018 19:46:19.426 資訊 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
14-Nov-2018 19:46:19.429 資訊 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.35
14-Nov-2018 19:46:19.602 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT]
14-Nov-2018 19:46:22.123 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in [2,505] ms
14-Nov-2018 19:46:22.126 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/docs]
14-Nov-2018 19:46:22.254 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/docs] has finished in [129] ms
14-Nov-2018 19:46:22.255 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/examples]
14-Nov-2018 19:46:23.442 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/examples] has finished in [1,187] ms
14-Nov-2018 19:46:23.448 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/host-manager]
14-Nov-2018 19:46:23.571 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/host-manager] has finished in [124] ms
14-Nov-2018 19:46:23.575 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/manager]
14-Nov-2018 19:46:23.633 資訊 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/manager] has finished in [58] ms
14-Nov-2018 19:46:23.639 資訊 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
14-Nov-2018 19:46:23.675 資訊 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
14-Nov-2018 19:46:23.823 資訊 [main] org.apache.catalina.startup.Catalina.start Server startup in 4651 ms

 

看tomcat有沒有啟動成功,如果沒有裡面會有錯誤資訊

 

 

catalina.out 日誌 要定時清空裡面檔案內容  日誌一直在累積,訪問日誌太多 幾個g都有 就要清一下

清空日誌檔案裡面的內容 減少空間佔用
[[email protected] logs]# > catalina.out