反馈已提交

网络繁忙

You are viewing 5.1 help doc. More details are displayed in the latest help doc.

Port occupancy view

  • Recent Updates: August 23, 2022
  • I. Overview

    If multiple projects are deployed in the system, it is likely that the ports are occupied. This article describes how to check whether the ports are occupied.

    II. Linux system

    1. method 1: use lsof statement to view

    1) introduction to lsof statement

    lsof (list open files) is a tool that lists the open files of the current system.

    lsof -iis used to display qualified processes. Execute lsof -i as root, as shown in the following figure:

    1622792745473112.png

    2) steps

    lsof -i:port number, used to view the occupancy of a port. For example, check the use of port 8080, lsof -i:8080, as shown in the following figure:

    1622792319178976.png

    According to the above figure, it can be concluded that the java process with process number (PID) of 22936 occupies port 8080.

    2. method 2: use netstat statement to view

    1) introduction to netstat statement

    netstat -tunlpis used to display the ports and processes of TCP and UDP, as shown in the following figure:

    1622792968169996.png

    2) steps

    netstat -tunlp|grep port number, used to view the process of the specified port number. For example, check the 8080 port,netstat -tunlp|grep 8080, as shown in the following figure:

    1622793206547046.png

    According to the above figure, it can be concluded that the java process with process number (PID) of 22936 occupies port 8080.

    III.Windows system

    netstat -ano: List all ports

    netstat -aon|findstr "port number": view the specified port, such as the 8075 port:netstat -aon|findstr "8075", as shown in the following figure:

    The last column is the corresponding PID. You can view the application corresponding to the corresponding process number in the 「task manager」.

    Attachment List


    Theme: Deployment Integration
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    售前咨询电话

    400-811-8890转1

    在线技术支持

    在线QQ:800049425

    热线电话:400-811-8890转2

    总裁办24H投诉

    热线电话:173-1278-1526

    文 档反 馈

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭