Commonly used statements for viewing Apache status in Linux

Source: Internet
Author: User
Collect common Apache status statements in Linux:

1. view the number of concurrent Apache requests and their TCP connection status:

Netstat-N | awk '/^ TCP/{++ s [$ NF]} end {for (a in S) print a, s [a]}'

The returned results are generally as follows:

Syn_recv 28
Close_wait 1
Time_wait 9
Established 4
Last_ack 1
Fin_wait1 1

Syn_recv indicates the number of requests waiting for processing; established indicates the normal data transmission status; time_wait indicates the number of requests waiting for the timeout to end.

2. view the number of Running Processes in Apache (prefork Mode)

PS-Ef | grep apache2 | WC-l

The number returned is the number of Apache processes. If the Apache file name in the system is httpd, run

PS-Ef | grep httpd | WC-l

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.