In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how linux checks whether tomcat is running or not". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to check whether tomcat is running by linux" can help you solve the problem.
View method: 1, use the "cd / installation directory / tomcat/bin" command to enter the bin directory of tomcat; 2, use the "ps-ef | grep java" command to check the startup of the service. If you display the id number of the process, the percentage of CPU occupied and other information, it means that the tomcat is running.
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Linux to see if tomcat is running
1. Enter the bin directory of tomcat
Cd / your installation directory / tomcat/bin
2. Check the startup of the service.
Ps-ef | grep java
If the following message appears, tomcat is not closed and is running
The first is the user who started the process, the second is the id of the process, the third is the percentage of CPU, and the fourth is the percentage of memory.
When using the kill command, you can kill the tomcat process directly.
Kill-9 7010
Continue to use the command to see if tomcat is closed
Ps-ef | grep java
If the following message appears, tomcat has been shut down
Root 7010 10 Oct19? 00:30:30 [java]
Expand knowledge:
1. How to view the path where tomcat is located
Find /-name 'tomcat'
2. How to view the tomcat log
1) change to the logs directory of the path where tomcat is located.
Cd / your installation directory / tomcat/logs
2) execute the command to view the log
Tail-f catalina.out
How many lines of logs are destined to be viewed
Tail-300 catalina.out
3. Tail command parsing
Format: tail [necessary parameters] [Select parameters] [File]
Function: used to display the end of the specified file, when the file is not specified, it is processed as input information. Commonly used to view log files.
Required parameters:
-f loop read
-Q does not display processing information
-v displays detailed processing information
Number of bytes displayed by-c
Number of rows displayed by-n
-pid=PID is used with-f to indicate that it ends after the process ID,PID dies.
-Q,-- quiet,-- silent never outputs the first part of the given file name
-s,-- sleep-interval=S is used with-f to indicate dormancy for S seconds at intervals of each iteration.
This is the end of the introduction to "how linux checks whether tomcat is running". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.