Howto psacct – ac

In continuation to the previous article on “Howto psacct” and “Find / Detect Command History for users“, we are here with a Howto psacct – ac

Howto psacct – ac – Display statistics about users’ connect time

The ac utility is used to display the connect time in hours based on the logins/logouts. There is a total of the time provided as well. If the command ac is fired without any options it will display just the total connect time:

[[email protected] ~]# ac

Output:

   total      120.40

Howto psacct – ac – Display the total for each day

To display the total for each day rather than a total use the following command

[[email protected] ~]# ac -d

Output:

Jan  1   total        2.07
Jan  2   total       16.45
Jan  5   total        0.00
Jan  6   total       28.68
Jan  8   total        9.81
Jan  9   total       21.67
Today   total       41.85

Howto psacct – ac – Display total for each user other than the one logged in the system

To display total for each user other than the one logged in the system, use the following command:

[[email protected] ~]# ac -p

Output:

   root                                 0.01
   gagan                              102.05
   total      120.58

No Comments

Post a Comment

Time limit is exhausted. Please reload CAPTCHA.