Home >Operation and Maintenance >Linux Operation and Maintenance >How to check tomcat running status in linux
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.
#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
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
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退出并停止服务
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!