View the number of concurrent requests for HTTP and their TCP connection status

Source: Internet
Author: User

  1. Statistics of connection data for port 80

    Netstat-nat | Grep-i "80" | Wc-l

  2. Count HTTPD Protocol Connections

    Ps-ef | grep httpd | Wc-l

  3. Statistics of connected, state-establish

    Netstat-na | Greo Establish | Wc-l

  4. Find out which IP connection is the most, and seal it off

    Netstat-na | grep Establish | awk {print $} | Awk-f:{print $1}| Sort | uniq-c | Sort-r +on

  5. View the current number of concurrent accesses to Apache

    Netstat-na | grep Establis | Wc-l

  6. See how many processes are there

    Ps-aux | grep httpd | Wc-l

  7. To view the number of concurrent requests for Apache and its TCP connection status

    Netstat-nt | awk ' {++s[$NF]}end{for (A in S) print A,s[a]} '

    SYN_RECV indicates the number of requests that are waiting to be processed; established indicates normal data transfer status; Time_wait indicates the number of requests that have been processed, waiting for the time-out to complete.
    Status: Description

    CLOSED: No connection is active or in progress

    LISTEN: The server is waiting to enter the call

    SYN_RECV: A connection request has arrived, waiting for confirmation

    syn_sent: Application has started, open a connection

    established: Normal data transfer status

    fin_wait1: Application says it's done

    Fin_wait2: The other side has agreed to release

    itmed_wait: Waiting for all packets to die

    CLOSING: Both sides try to close simultaneously

    time_wait: The other side has initialized a release

    Last_ack: Waiting for all packets to die

View the number of concurrent requests for HTTP and their TCP connection status

Related Article

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.