How to Find the Total Connect Time For User(s) in UNIX / Linux



Share this article :

The ac command prints the total connect time for all users or the connect time for specified users. Records are based on who logged in during the life of the current wtmp data file.

Command Options

-d = Creates a printout for each day, from midnight to midnight.
-p = Prints connect-time totals by individual login. 
     Without this flag, a total for the time period is printed.

Examples

Get the connect time for all users who logged in during the life of the current wtmp data file:

 /usr/sbin/acct/ac
        total    23.49

Get the total connect time for user itsiti and araadm, as recorded in the current wtmp data file:

 /usr/sbin/acct/ac itsiti araadm
        total    23.50

Get the connect-time subtotals for users itsiti and araadm, as recorded in the current wtmp data file:

 /usr/sbin/acct/ac -p itsiti araadm

Tags:

Related posts

nfsstat - NFS Performance Analysis
userdel: Delete User Account in UNIX & Linux
Keep Command Execute Repeatly in UNIX & Linux
finger: user information lookup program
© 2017 ITsiti. All Rights Reserved
Powered by KEEM