View the number of concurrent workers and processes of apache ApacheLinux (Tutorial) and number of workers apachelinux

Source: Internet
Author: User

View the number of concurrent workers and processes of apache ApacheLinux (Tutorial) and number of workers apachelinux

1. Check the current number of concurrent workers of apache:

Netstat-an | grep ESTABLISHED | wc-l

Compare the Number Difference of MaxClients in httpd. conf.

2. Check the number of processes:

Ps aux | grep httpd | wc-l

3. You can use the following parameters to view data:

Server-status? Auto

# Ps-ef | grep httpd | wc-l

1388

Count the number of httpd processes. A single request starts a process and is used on the Apache server.

This indicates that Apache can process 1388 concurrent requests. Apache can automatically adjust this value based on the load.

# Netstat-nat | grep-I "80" | wc-l

4341

Netstat-an prints the current network connection status of the system, while grep-I "80" is used to extract connections related to port 80. wc-l is used to calculate the number of connections.

The final number returned is the total number of requests on all port 80.

# Netstat-na | grep ESTABLISHED | wc-l

376

Netstat-an prints the current network connection status of the system, and grep ESTABLISHED extracts information about the ESTABLISHED connection. Then wc-l statistics.

The number returned is the total number of established connections on all port 80.

Netstat-nat | grep ESTABLISHED | wc-allows you to view detailed records of all ESTABLISHED connections.

View the number of concurrent Apache requests and their TCP connection status:

Linux Command:

Netstat-n | awk '/^ tcp/{++ S [$ NF]} END {for (a in S) print a, S [a]}'?

(This statement was obtained from Wang dawang, Technical Director of Sina interaction community division, Sina interaction community division. It is very good.) return result example:

LAST_ACK 5

SYN_RECV 30

ESTABLISHED 1597

FIN_WAIT1 51

FIN_WAIT2 504

TIME_WAIT 1057

The

SYN_RECV indicates the number of requests waiting for processing;

ESTABLISHED indicates the normal data transmission status;

TIME_WAIT indicates the number of requests that have been processed and wait for the timeout to end.

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.