I'd like to look at the aggregated usage information at a user level.

Basically hoping for a tool similar to htop but with the option to sum up all the processes for a user, for every user.


I think you want psacct (or acct on some systems). It will provide:

  • ac command prints the statistics of user logins/logouts (connect time) in hours.
  • lastcomm command prints the information of previously executed commands of user.
  • accton commands is used to turn on/off process for accounting.
  • sa command summarizes information of previously executed commands.
  • last and lastb commands show listing of last logged in users.

Install with

yum install psacct


sudo apt-get install acct

you then have to start the service

chkconfig psacct on
/etc/init.d/psacct start

Then you can use commands...

display total login time of each user

ac -p

display total of a user user

ac user

sa will give ps like usage stats... like

sa -m 


sa -c 

for processes and cpu minutes (this is the one you may be interested in).

I am not 100% sure if you want 100% htop compatible output, which is not what those will give you, but if you want stats like previous processes, percentages and usage, those two (out of all of those commands) will get you very close.

Most of that info was pulled from this article.

  • This looks great. but I'm not able to use sa without sudo permissions. ac works great though. – kmace Nov 12 '18 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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