Linux Viewer Port Usage

Source: Internet
Author: User

use command: Ps-aux | grep Tomcat found that there is no 8080 port for the Tomcat process. Use the command: NETSTAT–APN to see all process and port usage. Discover the following list of processes, where the last column is pid/program name discovery 8080 Port is occupied by the PID 9658 Java process. Further use of the command: Ps-aux | grep Java, or directly: Ps-aux | grep PID View will be able to clearly know that the 8080 port is what the program occupied! Then decide if you want to kill with the KILL command!


method Two: Direct use of NETSTAT-ANP | grep PortNo
namely: NETSTAT–APN | grep 8080 view port status under LinuxDuring Linux use, it is necessary to understand which ports are open to the current system, and to see the specific processes and users that open these ports, you can simply query through the netstat command
  1. The parameters of the netstat command are described below:
  2. -T: Indicates that the TCP port is displayed
  3. -U: Indicates the display of UDP ports
  4. -L: Only listen sockets (so-called sockets are programs that enable applications to read and receive communication protocols (protocol) and data)
  5. -P: Displays the process identifier and program name, and each socket/port belongs to a program.
  6. -N: Do not perform DNS polling, display IP (can speed up operation)
  7. All ports and process services on the current server can be displayed, with grep combined to see a specific port and service situation • • Netstat-ntlp
  8. View all current TCP ports NETSTAT-NTULP |grep 80//View all 80 port usage Netstat-an | grep 3306//View all 3306 port usage ·
  9. For example, to see if the current MySQL default port 3306 is started, you can do the following:

Linux Viewer Port Usage

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.