Home  >  Article  >  Operation and Maintenance  >  How to check tomcat running status in linux

How to check tomcat running status in linux

藏色散人
藏色散人Original
2023-03-22 09:34:136029browse

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

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栏位。

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

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退出并停止服务

View the tomcat running log in real time under Linux

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

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!

Statement:
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