A
A
Alexey2012-04-05 00:45:41
linux
Alexey, 2012-04-05 00:45:41

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

And this, in general, answers the question “what site is loading the server now”? But sometimes you also need to know the answer to the question “which host has created the most load in the last 5 minutes”?
I do not want to put a heavy munin for this. What simple solutions can you recommend?
Thank you!

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
admin4eg, 2012-04-05
@admin4eg

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 :(

P
Puma Thailand, 2012-04-05
@opium

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.

D
DmZ, 2012-04-05
@DmZ

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.

Z
ZloiZmei, 2012-04-05
@ZloiZmei

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.

E
egorinsk, 2012-04-05
@egorinsk

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 question

Ask a Question

731 491 924 answers to any question