Several commands for the Centos view process

Source: Internet
Author: User

1. Ps-ef | grep java

Represents the process information for viewing all processes where CMD is Java

2. Ps-aux | grep java

-aux Show All States

3. kill-9 [PID]

-9 means the forced process stops immediately

4. lsof-i:8080 View 8080 port occupancy

Other:

1. Netstat

Netstat-nat | grep 3306

2. lsof

Lsof-n-p-i tcp-s Tcp:listen

-N indicates that the host is displayed as an IP address

-P indicates that the port is displayed as a number, by default the port name

-I meaning more, specific man lsof, mainly used to filter lsof output results

-S and -I are used in conjunction to filter the output

3. Telnet

Telnet 127.0.0.1 3306

4. NC

Nc-w 10-n-Z 127.0.0.1 1990-1999

-W indicates waiting time for connection is ten seconds

-N try to convert port number names to port number numbers

-Z does not have input and output for ports that need to be inspected for port scan mode

127.0.0.1 the IP address to check

1990-1999 can be a port or a port

returns the result as an open port, such as the 1997 and 1998 ports In this example

https://my.oschina.net/foreverich/blog/402252

5. View occupy port and kill

http://blog.csdn.net/guoguo1980/article/details/2324454

Lsof-n-p-i tcp-s Tcp:listen

Kill process ID

Several commands for the Centos view process

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.