Linux + Apache to detect the Connection Counts of each Vhosts? -
With RHEL and Apache (httpd), here's a way:
- Find out V.host (domain) How much incoming connection is receiving?
Because in these few days, I get incoming connections on the server:
- PS aux | Grep httpd -c
734This means that I have
734 incoming connections that are currently being managed by Apache but there is a problem (To say) 10 Vhosts
- Which domain is getting high load?
Any faster solution please
Say that you have a file like /etc/apache2/sites-enabled/000-example.com
You can look like lines:
& lt; VirtualHost *: 80 & gt; ServerName www.example.com ServerAlias example.com DocumentRoot /www/example.com
Next down, if you want, you can change lines to create logfiles for each virtual host
error log $ $ {APACHE_LOG_DIR} /error.log custom log $ {APACHE_LOG_DIR} /access.log composite
lot:
Error log $ $ {APACHE_LOG_DIR} /example_com.error.log Custom log $ {APACHE_LOG_DIR} /example_com.access.log composite
Otherwise, You do not want to create a logfile for Your own custom log format
For example:
logformat "% v% h% l% u% t \"% r \ "%>% B Normal Custom Log $ {APACHE_LOG_DIR} /access.log Normal
When you decide how you want to log in, you can check or compare your logs You can write all types of scripts. If you are using different logfiles for each virtual host, then it will be very easy because you try it Are spun.
wc -l /var/log/apache2/*access.log
- Which domain is getting high load?
- PS aux | Grep httpd -c
Comments
Post a Comment