In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces how to use ss command in linux, the content is very detailed, interested friends can refer to it, I hope it can help you.
SS is an abbreviation for Socket Statistics. The ss command can be used to get socket statistics, and it displays something similar to netstat. The advantage of ss is that it can display more detailed information about TCP and connection status, and it is faster than netstat. When the number of socket connections to the server becomes very large, execution will be slow whether using netstat command or cat /proc/net/tcp directly. The ss command takes advantage of tcp_diag in the TCP stack. tcp_diag is a module for analyzing statistics and getting first-hand information about the Linux kernel, so ss command performance is much better.
common options
-h, --help help
-V, --version Display version number
-t, --tcp Shows TCP sockets
-u, --udp Displays UDP sockets
-x, --unix Displays unix domain sockets, same as-f option
-n, --numeric Does not resolve the name of the service, e.g. port "22" does not appear as "ssh"
-l, --listening Show only listening ports
-p, --processes Show processes listening on ports (sudo required on Ubuntu)
-a, --all For TCP, both listening ports and established connections are included.
-r, --resolve Interprets IP as domain name and port number as protocol name
common use cases
If you do not add the option ss command default output all established connections (excluding listening ports), including tcp, udp, and unix socket three types of connections:
View ports on which hosts listen
$ ss -tnl
Resolve IP and port numbers with the-r option
$ ss -tlr
Use the-p option to view the name of the program listening on the port
$ sudo ss -tlp
The last column is the name of the program running. You can also continue filtering through grep:
$ sudo ss -tlp | grep ssh
View TCP connections made
-a --all For TCP, both listening ports and established connections are included.
$ ss -tna
display more information
-o, --options Display time information
-m, --memory Displays memory used by socket
-i, --info Show more information inside TCP
Display summary information
$ ss -s
How to use the ss command in linux is shared here. I hope the above content can be of some help to everyone and learn more. If you think the article is good, you can share it so that more people can see it.
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.