I would like to view the total duration a user has been logged into the system for.
To accomplish this I use `ac` from the package acct. However, this does not appear to be keeping time accurately.
That's just fine. But, The time is 17:17 and running:Code:#man ac ac prints out a report of connect time (in hours) based on the logins/logouts in the current wtmp file. A total is also printed out.
No problem so far, this account has just been created and logged in.Code:#ac -p account-name 0.01
The time is now, 17:25 - Running:
A quick calculation - ((25 / 100) * 60) = 15. So this user has been logged in for 15 minutes. However, 17:25 - 17:17 is EIGHT minutes.Code:#ac -p account-name 0.25
Is my calculation incorrect, or is this a bug??
If it is a bug, can you provide a workaround. Or an alternative way to get the total duration a user has been logged in for?
Thanks,



Adv Reply
Bookmarks