Answer the question
In order to leave comments, you need to log in
Tools to monitor load average per period per virtual host on apache2-mpm-itk?
Friends, my question can be reformulated as follows: how can I see LA for each user individually, sorting the list in descending order? :-)
There are several virtual hosts on the server, they are distributed among different users using apache2-mpm-itk
. You can see the current load like this:
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10
Answer the question
In order to leave comments, you need to log in
I asked a similar question, I haven’t decided yet, but there are plugins on the munin website that show the load by users, they are implemented almost as you wrote above, but the result is added to the munin database.
I have these plugins separately from everything, how the scripts are executed normally, but infa does not enter the munin or he cannot get it until he figured it out :(
munin in my opinion is the easiest solution for such a task, where does the opinion come from that munin is heavy? In my opinion, in an age when on new servers from 8 cores and from 8 gigs of RAM, there can be no heavy munin.
Try atop - collects the same statistics as sar, but in addition to it also saves the resource usage of all processes. Then, from its output, you can analyze when, who and how much the processor ate.
I have this on my server (Centos, apache2-mpm-itk). But I didn’t install it myself, but the admins from isplicense.ru, and you can’t really determine what kind of beast by the binary.
On the main link:
Get statistics for:
Current (last 15 min)
Last hour
Last 24 hours
Last week
Last month
All time
And you can specify the period:
Custom period (format - dd-mm-yyyy hh:mm:ss) from to
When viewing displays the columns:
Username/ CPU, % / MEM, MB / MEM peak, MB / Forks, N/min
Write to the guys, they'll tell you what they use for this purpose. Or put for a small bribe.
In linux systems since ancient times (as in unix) there is the ability to audit - this is when the kernel counts. which of the users consumed how many resources. Accordingly, there are utilities to enable auditing and collect this data. You can google in this direction.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question