View port usage in Linux

Source: Internet
Author: User


Run the following command to check port usage in Linux: lsof-I: <port number> For example: www.2cto.com Linux code [root @ SonarServer1 user0] # lsof-I: 80 command pid user fd type device size/off node name java 19408 root 144u IPv6 183572842 0t0 TCP *: http (LISTEN) www.2cto.com you can also use the following COMMAND: netstat-apn | grep <port number> For example: Linux code [root @ SonarServer1 user0] # netstat-apn | grep 80 tcp 0 0 ::: 80 ::: * After finding the process number in LISTEN 19408/java, run the following command to View Details: ps-aux | grep <process number> Lin Ux code [root @ SonarServer1 user0] # ps-aux | grep 19408 Warning: bad syntax, perhaps a bogu '-'? See/usr/share/doc/procps-3.2.8/FAQ root 19408 3.8 2.2 2520992 357368? Sl java-Djava. awt. headless = true-XX: MaxPermSize = 128 m-Xms256m-Xmx512m-Djava. library. path =. /lib-classpath .. /.. /lib/servlet-api-2.5-20081211.jar :.. /.. /lib/jetty-util-6.1.25.jar :.. /.. /lib/activation-1.1.jar :.. /.. /lib/geronimo-spec-jta-1.0-M1.jar :.. /.. /lib/wrapper-3.2.3.jar :.. /.. /lib/commons-io-2.0.1.jar :.. /.. /lib/jetty-6.1.25.jar :.. /.. /lib/sonar-application-3.2.jar :.. /.. /lib/jetty-naming-6.1.25.jar :.. /.. /lib/jetty-plus-6.1.25.jar :.. /.. /:.. /.. /extensions/jdbc-driver/mysql/mysql-connector-java-5.1.18.jar :.. /.. /extensions/jdbc-driver/postgresql/postgresql-9.0-801.jdbc3.jar :.. /.. /extensions/jdbc-driver/mssql/jtds-1.2.4.jar-Dwrapper. key = n24m_l80HqD33MJi-Dwrapper. port = 32000-Dwrapper. jvm. port. min = 31000-Dwrapper. jvm. port. max = 31999-Dwrapper. pid = 19406-Dwrapper. version = 3.2.3-Dwrapper. native_library = wrapper-Dwrapper. service = TRUE-Dwrapper. cpu. timeout = 10-Dwrapper. jvmid = 1 org. tanukisoftware. wrapper. wrapperSimpleApp org. sonar. application. startServer root 19460 0.0 0.0 105476 948 pts/5 S + grep 19408

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.