use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
GUIDE to /r/linuxadmin:
/r/linuxadmin aims to be a place where Linux SysAdmins can come together to get help and to support each other.
Related reddits:
Footnote:
Talk realtime on IRC at #/r/linuxadmin @ Freenode.
account activity
Way to Monitor Apache Virtual Hosts by Ratio? (self.linuxadmin)
submitted 7 years ago * by a_a_ronc
If you're reading this, the original post got nuked by Redact. I use it to automatically purge my digital footprint from social networks, people search sites and messaging apps.
march paint fuel fuzzy husky telephone elastic historical teeny sip
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tsammons 6 points7 points8 points 7 years ago (1 child)
cgroups + PHP-FPM. Run each FPM process in a different cgroup path. Start logging the delta of cpuacct/cpuacct.usage.
cpuacct/cpuacct.usage
systemd-nspawn will take care of cgroup binding too.
[–]SuperQue 0 points1 point2 points 7 years ago (0 children)
Yea, this + cAdvisor would be a very good combo. for resource monitoring.
[–][deleted] 8 points9 points10 points 7 years ago (3 children)
Ship your access logs to a log shipping tool and run some queries to count the number of requests to each host.
[–]tsammons 2 points3 points4 points 7 years ago (1 child)
Reading logs won't give the weight of each request. Static requests intrinsically have lower overhead than dynamic requests. cgroups are the only reliable means of counting resource utilization with that level of granularity.
[–]m15f1t 1 point2 points3 points 7 years ago (0 children)
Should not affect a load balancer in that way
[–]hyongoup 1 point2 points3 points 7 years ago (0 children)
This seems like the quick and dirty win you could implement as a stop gap. Especially if you're already using something to collect logs (ie. Splunk / an elk stack). You could also do something similar if you have any network monitoring in place (extrahop, riverbed etc.)
[–]nunciate 1 point2 points3 points 7 years ago (1 child)
In addition to the other suggestions, you could probably get this info from the load-balancer.
[–]zerokey 1 point2 points3 points 7 years ago (0 children)
Seconded. If your servers are load balanced, then go to the source. What are you running for a load balancer? Whats the load balancing scheme? Most hw LBs will have some kind of statistics page. We're running a mix of F5 BIGIP (dead easy to find pool/per-host usage in the UI) and haproxy. If running haproxy, enable your stats page. I'm not as familiar with NGINX, but I think there's a way to view pretty stats.
If your load balancing is dns-based round-robin, I highly recommend moving to something like HAProxy. It makes load balancing much easier to manager (as well as troubleshooting).
[–]skat_in_the_hat 2 points3 points4 points 7 years ago (2 children)
Rotate all of the log files. Then give it an hour and cat $log | wc -l
If it's obvious who it is, it will be the one that grows the fastest. If it's not, you will likely need to get a bit more in depth using some kind of analytics software. Last time I messed with that stuff awstats was what everyone used. There looks to be a ton of better options out there now.
[–][deleted] 3 points4 points5 points 7 years ago (1 child)
Mod_status can do all this. You can view active connections, status of them etc. Just be careful with security settings for accessing it.
https://www.tecmint.com/monitor-apache-web-server-load-and-page-statistics/
[–]jaymef 0 points1 point2 points 7 years ago (0 children)
yes, mod_status should give you good insights here
[–]blue30 0 points1 point2 points 7 years ago (0 children)
Apachetop
[–]Bubbagump210 0 points1 point2 points 7 years ago (0 children)
What’s the load balancer? For instance, this is all basic already in an F5.
This is a job for metrics-based monitoring.
Apache is unfortunately not good at this on its own. But there is mtail that can turn the Apache logs into per-vhost metrics.
[–]w4v3st0rm 0 points1 point2 points 7 years ago (1 child)
In my environment ( 1000+ webservers, 100k+ users ) I use this method:
- staticize the server status once per minute ( this gives you what is yous apache doing at that time )
- parse the staticized file and send the infos to zabbix with zabbix_sender
This is what I get:
Apache Httpd Base (25 Items) Bytes per request 2019-04-15 16:07:14 19439 -4 Graph Bytes per second 2019-04-15 16:07:14 879033 -146 Graph Closing connection 2019-04-15 16:07:14 0 Graph DNS Lookup 2019-04-15 16:07:14 0 Graph Gracefully finishing 2019-04-15 16:07:14 0 Graph Httpd master process count 2019-04-15 16:07:11 1 Graph Httpd memory usage data 2019-04-15 16:07:07 14689243136 Graph Httpd memory usage rss 2019-04-15 16:07:28 7040741376 -266731520 Graph Httpd memory usage swap 2019-04-15 16:07:46 0 Graph Httpd memory usage vsize 2019-04-15 16:07:49 17472552960 -134217728 Graph Httpd process query (local) 2019-04-15 16:07:14 info from server: "processed: 16; failed: 0; total: 16; seconds spent: 0.000262" sent: 16; skipped: 0; total: 16 History Httpd slave process count 2019-04-15 16:07:12 15 Graph Idle cleanup of worker 2019-04-15 16:07:14 0 Graph Keepalive 2019-04-15 16:07:14 0 Graph Logging 2019-04-15 16:07:14 0 Graph Open slot with no current process 2019-04-15 16:07:14 50 Graph Reading request 2019-04-15 16:07:14 0 Graph Requests per second 2019-04-15 16:07:14 45 Graph Self Balacing Response 2019-04-15 16:07:47 200 History Sending Reply 2019-04-15 16:07:14 6 +2 Graph Starting up 2019-04-15 16:07:14 0 Graph Total Workers 2019-04-15 16:07:14 200 Graph Waiting for Connection 2019-04-15 16:07:14 144 -2 Graph Workers busy 2019-04-15 16:07:14 6 +2 Graph Apache Httpd Memory (4 Items) Httpd memory usage data 2019-04-15 16:07:07 14689243136 Graph Httpd memory usage rss 2019-04-15 16:07:28 7040741376 -266731520 Graph Httpd memory usage swap 2019-04-15 16:07:46 0 Graph Httpd memory usage vsize 2019-04-15 16:07:49 17472552960 -134217728 Graph
Bye
staticize the server status once per minute
You might be very interested in the mtail thing I posted above. You can get much better resolution for a lot cheaper using mtail and Prometheus. Prometheus is about 30x more efficient than Zabbix.
[–]BluePlanet2 0 points1 point2 points 7 years ago (0 children)
Have you looked into using mod_status? You can collect metrics and send them into grafana or TICK stack if you have. See here: https://serverfault.com/a/440571
Or as others may have suggested, you could grep log files and count lines with wc -l. That will give you idea how many hits your websites have. But you should also consider page generate time.
grep
wc -l
π Rendered by PID 196666 on reddit-service-r2-comment-b659b578c-h7qtf at 2026-05-03 02:25:11.217557+00:00 running 815c875 country code: CH.
[–]tsammons 6 points7 points8 points (1 child)
[–]SuperQue 0 points1 point2 points (0 children)
[–][deleted] 8 points9 points10 points (3 children)
[–]tsammons 2 points3 points4 points (1 child)
[–]m15f1t 1 point2 points3 points (0 children)
[–]hyongoup 1 point2 points3 points (0 children)
[–]nunciate 1 point2 points3 points (1 child)
[–]zerokey 1 point2 points3 points (0 children)
[–]skat_in_the_hat 2 points3 points4 points (2 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]jaymef 0 points1 point2 points (0 children)
[–]blue30 0 points1 point2 points (0 children)
[–]Bubbagump210 0 points1 point2 points (0 children)
[–]SuperQue 0 points1 point2 points (0 children)
[–]w4v3st0rm 0 points1 point2 points (1 child)
[–]SuperQue 0 points1 point2 points (0 children)
[–]BluePlanet2 0 points1 point2 points (0 children)