View the current number of concurrent requests of Apache

Source: Internet
Author: User

We often need to check the number of httpd processes for optimization (that is, the number of concurrent requests that Apache can process in prefork mode ):

Linux Command:

PS-Ef | grep httpd | WC-l

The result is the number of concurrent requests that Apache can process. This value is automatically adjusted based on the load.

# Ps-Ef | grep httpd | WC-l
27

PS-EF is to view all processes, and then filter the process information you want through grep

Parameter description:-e displays all processes in the full-F format.

# Ps-Ef | grep httpd

Parameter description: Check all httpd processes.

# Ps-Ef | grep httpd | WC-l

Parameter description: Check all httpd processes and output only the number of file lines through WC-L.


WC command
WC-C filename: displays the number of bytes of a file.
WC-M filename: display the number of characters in a file
WC-l filename: display the number of lines in a file
WC-l filename: display the maximum length of a file
WC-W filename: display the number of words in a file
run wc wc1.txt directly:
[ROC [email protected] programming] $ WC wc1.txt
3 5 16 wc1.txt
the output information is as follows: number of lines, number of characters, and number of bytes.

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.