0

I'm trying to get stats on global CPU usage of a server on a per-user basis so I installed GNU Accounting (acct) (on Ubuntu server 16.04).

When asking for stats with sa -m, it takes data from the current /var/log/account/pacct, which is rotated by the acct service. I understood that I can give the archived rotated files as input to it, if I want to get statistics on older entries.

The problem is that sa gives no dates on the statistics that are displayed, and I couldn't find a way to have dates on it? This would allow me get statistics on a day or week manner.

CharlesB
  • 545
  • 1
  • 4
  • 20
  • Are you looking for something within `sa` command or `ac` command too? `ac -d` will gives you daily report but only for login logout. – asktyagi Sep 04 '19 at 05:11

2 Answers2

0

Are you looking for something like :

dump-acct /var/log/account/pacct

averon
  • 76
  • 3
0

I found that on Ubuntu the acct service is logrotated each day. This gives the option to run sa -m on each archived log file, in /var/log/account, to have a per-day report, which is sufficient for my use.

CharlesB
  • 545
  • 1
  • 4
  • 20