View processes through ports in Linux

Source: Internet
Author: User
Linux through Port View process Method 1: lsof-Pnl + M-i4 | grep81_lsof command parameter explanation 1)-P: This option restricts the Network File port number to port name conversion. Constraint conversion can make lsof run faster. In Linux, the port name cannot be searched. Method 1:
Lsof-Pnl + M-i4 | grep 8453
Lsof command parameter explanation
1)-P: This option restricts the conversion from the port number of the network file to the port name. Constraint conversion can make lsof run faster. This is useful when Port Name Search cannot take effect.
2)-n: This option restricts the conversion from the port number of the network file to the host name. Constraint conversion can make lsof run faster. It is useful when the host name cannot be found.
3)-l: This option restricts the conversion from user ID to login name. This option is useful when the login name is found incorrectly or slowly. Www.2cto.com 4) + M: This option supports registration reports for local TCP and UDP port ing programs. 5)-i4: only lists the ports under the IPv4 protocol. 6)-i6: only list the ports under the IPv6 protocol. Method 2:
1. use netstat to view the process PID [root @ test ~] # Netstat-anp | grep 5001 tcp 0 ::: 5001 ::: * LISTEN 12886/java 2. use ps to view the process status by sziitjiang

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.