Linux Network Status Tool SS command use detailed

Source: Internet
Author: User

The SS command is used to display the socket status. He can display statistics such as packet sockets, TCP sockets, UDP sockets, DCCP sockets, RAW sockets, Unix domain sockets, and so on. It shows more TCP and state information than other tools. It is a very practical, fast and efficient new tool for tracking IP connections and sockets. The SS command can provide the following information:

  • All TCP sockets

  • All UDP sockets

  • All Ssh/ftp/ttp/https Persistent connections

  • All local processes connected to the Xserver

  • Use state (for example: Connected, synchronized, SYN-RECV, syn-sent,time-wait), address, port filtering

  • All state fin-wait-1 tcpsocket connections and more

Many popular Linux distributions support SS as well as many monitoring tools using the SS command. Familiarity with this tool will help you better identify and resolve system performance issues. I strongly recommend that you use the SS command instead of the netstat part of the command, such as NETSAT-ANT/LNT.

Show him before you make a comparison, count the number of server concurrent connections

Netstat

# time Netstat-ant | grep EST | Wc-l

235


Real 0m12.970

User 0m0.334s

SYS 0m12.561s


The result is obviously SS statistics concurrent connection number efficiency Netstat, in SS can be done, you will also choose Netstat, still hesitate, see the following example, or jump to help page.

Common SS Commands:

Ss-l Show all ports that are open locally

SS-PL Show each process specific open socket

Ss-t-A displays all TCP sockets

Ss-u-a displays all UDP Socekt

ss-o state established  ' (Dport =: SMTP or sport =: SMTP) '   Displays all established SMTP connections

ss-o state established  ' (Dport =: http or sport =: http) '   Displays all established HTTP connections

ss-po Show all process pid information

ss-x src/tmp/. x11-unix/* Find all processes connected to X server

SS-S List Current socket details:


Linux Network Status Tool SS command use detailed

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.