Linux query to stop the tomcat process

Source: Internet
Author: User
For Linux queries, it is better to stop the tomcat process than to keep a good memory, and record the knowledge of Linux. The project needs to restart tomcat regularly, so write a script. There is a sentence to query the current tomcat running process. Ps-ef | greptomcat-dir | grep-vg Linux query. it is better to stop the tomcat process and keep a record of your knowledge in Linux. The project needs to restart tomcat regularly, so write a script. There is a sentence to query the current tomcat running process. Ps-ef | grep tomcat-dir | grep-v grep | awk '{print $2}' # tomcat-dir: tomcat installation path. # Grep-v: Invert selection (matching rows are not displayed) grep-v grep does not display rows containing (grep) fields # awk: process the query results $0: complete path $1: current login username $2: tomcat process pid currently has 4 tomcat processes. Shutdown. sh many times does not completely stop the tomcat process, so you need this pid to end the process. Kill-9 tomcat-pid
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.