Re: process accounting on 5.7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



From: Alan McKay <alan.mckay@xxxxxxxxx>

> On Tue, Mar 20, 2012 at 7:11 AM, John Doe <jdmls@xxxxxxxxx> wrote:
>>From a quick look, it does not seem to have a user entry in the 
> stats...
> UID and GID are there
> Anyone else have anything on this?

Indeed, I looked too fast and missed the IDs...
So, why not just something like this:
dump-acct /var/account/pacct | awk -F\| ' 
    { total_cpu += $4; cpu[$5] += $4;
      total_ram += $7; ram[$5] += $7 }
    END { for (x in cpu) { 
              print x" "int((cpu[x]*100)/total_cpu)"% "int((ram[x]*100)/total_ram)"%"; } } '
Or just 'sa -m'?

JD
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux