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.


  1. How to see how long a user is active?
  2. A user might be suspended, hibernated, .. in other status etc. Is there a comprehend program that keeps track of all these?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.