How to check tomcat running status in linux

藏色散人
Release: 2023-03-22 09:34:13
Original
6005 people have browsed it

Linux method to check the running status of tomcat: 1. Enter the bin directory of tomcat through cd; 2. Execute the "ps -ef|grep java" command to display the process; 3. Use "tail -f catalina .out" command to view the tomcat running log in real time.

How to check tomcat running status in linux

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

How to check tomcat running status in Linux?

Check the status of Tomcat under linux and enable the stop service command

First enter the bin directory of your tomcat

cd /你的安装目录/tomcat/bin
Copy after login

Check the service startup status

ps -ef|grep java The specific meaning of this command ps: display a certain process

-A  显示所有程序。
-e  此参数的效果和指定"A"参数相同。
-f  显示UID,PPIP,C与STIME栏位。
Copy after login

The grep command is to search

How to check tomcat running status in linux

Before starting the service, shut down the service first

./shutdown.sh
Copy after login

If the shutdown is unsuccessful, you can use it.

kill -9 7010 Kill process 7010. It should be noted that 7010 is the id of the current tomcat process

Start the service:

./startup.sh       //直接启动
nohup ./startup.sh &      //作为服务启动
./catalina.sh run //控制台动态输出方式启动,动态的显示tomcat控制台输出信息,Ctrl+c退出并停止服务
Copy after login

View the tomcat running log in real time under Linux

cd .. //返回上一级目录
cd tomcat/logs //切换目录。
tail -f catalina.out //查看日志,同样Ctrl+c退出
Copy after login

Related recommendations: "Linux Video Tutorial

The above is the detailed content of How to check tomcat running status in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template