I'd like to write a code that restricts myself from accessing the laptop for too long. To do that, I have to have access to user's active time.
Currently, I use
ac (a part of GNU accounting utils) to see how long a user has been logged in. However, when a user is suspended by
$ systemctl suspend, the logger keeps ticking.
- How to see how long a user is active?
- A user might be suspended, hibernated, .. in other status etc. Is there a comprehend program that keeps track of all these?