View process and delete process under CentOS

Source: Internet
Author: User

1. Pressing the TAB key after entering 1-2 characters on the LINUX command platform automatically complements the next part (provided that you have this thing, for example, if you have Tomcat, enter Tomcat to press TAB).
2. The PS command is used to view the currently running process.
grep is a search
Example: Ps-ef | grep java
Represents the process information for viewing all processes where CMD is Java
Ps-aux | grep java
-aux Show All States
Ps
3. Kill command to terminate the process
Example: kill-9 [PID]
-9 means the forced process stops immediately
Usually use PS to view the process PID, terminate the process with the KILL command
Online about these two pieces of content
-----------------------------------------------------------------------------------
Ps
-----------------------------------------------------------------------------------
1. Introduction to PS
PS command is the most fundamental corresponding case is also quite strong Earth Process view command. Use this command to determine which processes are running and running, whether the process is complete, if the process is dead, which processes are consuming too much resources, and so on. In short, most of the information is available by executing the command.
2. PS command and its parameters
The PS command is most often used to monitor the background process, because the background process does not communicate with these standard input/output devices on the on-screen keyboard, so if you need to detect the situation, you can use the PS command.
The syntax format for this command is as follows:
PS [Options]
-e Show all processes, environment variables
-F Full format
-H does not display the caption
-L Long format
-W Wide output
A
Show all processes on the terminal, including other user processes
R
Show only running processes
X
Show no control of the terminal process
o[+|-] K1 [, [+|-] K2 [,...]] Displays the list of processes according to the shortcut keys specified in the short keys, K1, K2, and in the multilevel sort order.
There are default order designations for different formats for PS. These default orders can be overridden by the user's designation. In this case the "+" character is optionally, the "-" character is inverted the specified key to the local direction.
PIDs lists only the process identifiers, separated by commas. The process list must be given immediately after the last option in the command-line argument, with no spaces inserted in the middle. For example: ps-f1,4,5.
The following describes the long command-line options, which begin with "--":
--sort x[+|-] key [, [+|-] key [,...]] Select a multi-letter key from the Sort keys section. " The + "character is optional because the default orientation is in ascending or dictionary order of numbers. For example: Ps-jax-sort=uid,-ppid,+pid.
--HELP Displays help information.
--version Displays the version information for this command.
The sort key is mentioned in the previous option description, and the sort key is further explained. It is important to note that the values used in the sorting are the internal values of the PS application and are not used only for some output format pseudo-values. The sort key list is shown in table 4-3.
Table 4-3 List of sort keys
C
Cmd
Simple name to execute
C
CmdLine
Full command line
F
Flags
Long mode flag
G
Pgrp
Process Group ID
G
Tpgid
Control TTY Process Group ID
J
Cutime
Cumulative User Time
J
Cstime
Cumulative system time
K
Utime
User Time
K
Stime
System time
M
Min_flt
Minor page fault

View process and delete process under CentOS

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.