1

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.

Question

  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?

0

You must log in to answer this question.

Browse other questions tagged .