In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
What command does linux have to check the port status? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
The parameters of the netstat command are described as follows:
-a: list all network status, including Socket programs
-c seconds: specify how often the network status is refreshed
-n: displayed with IP address and port number, not domain name and service name
-p: displays PID and program name
-t: displays the connection status using the TCP protocol port
-u: displays the connection status using the UDP protocol port
-I: only connections that show listening statu
-r: displays the routing table
The netstat command is combined with grep to view a specific port and service.
Netstat-ntlp / / View all current tcp ports netstat-ntulp | grep 80 / / View the usage of all 80 ports netstat-anp | grep 3306 / / View the usage of all 3306 ports
Check which services and ports are on a server
Netstat-lanp
Check how many ports a service has. For example, to check mysqld
Ps-ef | grep mysqld
Check the number of connections on a port. For example, port 3306
Netstat-pnt | grep: 3306 | wc
View the connection client IP for a port. For example, port 3306
Netstat-anp | grep 3306
View network port
This is the answer to netstat-an's question about what command to check the port status of linux. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.