PS kill Tomcat Process

Source: Internet
Author: User
The two commands described in this section are used to view the current situation of system users. The following describes the process. This is also the topic of this chapter. to monitor and control the process, you must first understand the situation of the current process.
You need to view the current process, and the ps command is the most basic and very powerful process view command. you can use this command to determine which processes are running and running, whether the processes are completed,
There are no botnets in processes, which occupy too much resources, etc. In short, most of the information can be obtained by executing this command.

The most common ps command is used to monitor the working conditions of background processes, because background processes do not communicate with standard input/output devices such as the screen keyboard, so if you need to detect the situation, you can use the ps command.

PS [Option]

The following describes the Command Options:

-E: displays all processes.

-F full format.

-H does not display the title.

-L long format.

-W width output.

A displays all processes on the terminal, including those of other users.

R only displays running processes.

X displays the processes without control terminals.

O [+ |-] K1 [, [+ |-] K2 [,…] Based on the number of keykeys specified in short keys, K1, and K2
The process list is displayed in a sorted order. The default sequence is specified for different PS formats.
The order of recognition can be overwritten by the user's designation. The "+" character is optional, and the "-" character is reversed to specify the direction of the key.

The three most common parameters are u, A, and X.Then, perform operations on the Tomcat process: Start, shut down, and kill the Tomcat process in Linux.

Open Terminal
# Execution
Bin/startup. Sh # start Tomcat
Bin/shutdown. Sh # Stop Tomcat
Tail-F logs/Catalina. Out # view Tomcat console output;

# Check whether Tomcat is running
PS-Ef | grep Tomcat
# If yes, use kill;
Kill-9 pid # PID is the corresponding process number

For example, the pe-Ef | grep Tomcat output is as follows:

Sun 5144 1 0 00:00:06 pts/1/Java/JDK/bin/Java-djava. util. logging. manager = org. apache. juli. classloaderlogmanager-djava. endorsed. dirs =/Java/tomcat/common/endorsed-classpath:/Java/tomcat/bin/Bootstrap. jar:/Java/tomcat/bin/commons-logging-api.jar-dcatalina. base =/Java/tomcat-dcatalina. home =/Java/tomcat-djava. io. tmpdir =/Java/tomcat/temp Org. apache. catalina. startup. bootstrap start

Then 5144 is the process ID pid = 5144
Kill-9 5144 to completely kill Tomcat

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