View port usage in Linux

Source: Internet
Author: User


In Linux, check port usage and check which program occupies port 3306 [root @ DB13 ~] # Lsof-I: 3306 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME mysqld 6153 mysql 10u IPv4 13751 TCP *: mysql (LISTEN) mysqld 6153 mysql 111u IPv4 13816917 TCP 10.1.1.13: mysql-> apache2: 4832 (ESTABLISHED) mysqld 6153 mysql 161u IPv4 13816822 TCP 10.1.1.13: mysql-> apache2: 4620 (ESTABLISHED) mysqld 6153 mysql 228u IPv4 13817771 TCP 10.1.1.13: mysq: check which service on port 3306 uses www.2cto.com [root @ DB13 ~] # Netstat-tunlp | grep: 3306 tcp 0 0 0.0.0.0: 3306 0.0.0.0: * LISTEN 6153/mysqld [root @ DB13 ~] # Check whether port 3306 is in use. You can verify that the service using this port is running properly. [root @ DB13 ~] # Netstat-an | grep: 3306 tcp 0 0 0.0.0.0: 3306 0.0.0.0: * LISTEN tcp 0 0 10.1.1.13: 3306 10.1.1.7: 9486 TIME_WAIT tcp 0 0 10.1.1.13: 3306 10.1.1.7: 8459 TIME_WAIT tcp 0 0 10.1.1.13: 3306 10.1.1.7: 9510 TIME_WAIT tcp 0 0 10.1.1.13: 3306 10.1.1.7: 7968 TIME_WAIT tcp 0 0 10.1.1.13: 3306 10.1.1.7: 8773 TIME_WAIT tcp 0 0 10.1.1.13: 3306 10.1.1.7: 10817 TIME_WAIT tcp 0 293 10.1.1.13: 3306 10.1.1.7: 11103 ESTABLISHED tcp 0 0 10.1.1.13: 3306 10.1.1.7: 9561 TIME_WAIT tcp 0 52 10.1.1.13: 3306 10.1.1.7: 11104 ESTABLISHED tcp 0 10.1.1.13: 3306 10.1.1.7: 9568 TIME_WAIT

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.