Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to get statistic hourly by used averages resources per user such as cpu and memory. How I can get it?

share|improve this question

migrated from stackoverflow.com Nov 20 '12 at 19:45

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 0 down vote accepted

http://linux.die.net/man/1/sar

SAR to the rescue

You can get activity reports with this linux command. I especially like this article showing different usages:

http://www.thegeekstuff.com/2011/03/sar-examples/

Or, per user, you can use sa:

http://www.gnu.org/software/acct/manual/html_chapter/accounting_6.html#SEC20

$ sa --user-summary
                                       23       0.13re       0.01cp         0avio      3163k
root                                    9       0.13re       0.01cp         0avio      3588k
ssperandeo                              3       0.00re       0.00cp         0avio      1467k
rabbitmq                               10       0.00re       0.00cp         0avio      1020k
postgres                                1       0.00re       0.00cp         0avio     25856k
share|improve this answer
    
Thnx, but I don't see how I can show it per user –  Devoll Nov 20 '12 at 17:45
    
Updated to address user-specific queries. –  Homer6 Nov 20 '12 at 17:53
    
This command output result for all time (since last reboot)? –  Devoll Nov 20 '12 at 17:58
    
All time. It saves it to a file. –  Homer6 Nov 20 '12 at 18:02
    
A lot of thanx! –  Devoll Nov 20 '12 at 18:18
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.