Embedded usage statistics

Asked by Ronny Roscher

I recently started using Timekpr-nExT on two POP_OS machines. So far so good. Now I'm curious whether there's a way to see/evaluate the time spend on the machine by the user. So does Timekpr-nExT write a log which I could evaluate afterwards?

I just want to know how much time my child spend usning the computer. 1st level would be a plain number used x of y hours per day/week.
As Timekpr-nExT tracks the "session time" I'm quite sure I wouldn't be a problem to store the time left/time spend in a file which overwrites once per week to safe space.


Question information

English Edit question
Timekpr-nExT Edit question
Eduards Bezverhijs Edit question
Solved by:
Eduards Bezverhijs
Last query:
Last reply:
Revision history for this message
Eduards Bezverhijs (mjasnik) said :

That's easy...

Timekpr-nExT already accounts this information, you can view that in administrator application, please look at "Time spent (week)" and "Time spent (month)". User can see these values too using client app (the icon).

These values are written to so called .time files, which are located in /var/lib/timekpr/work/<username>.time, these files are annotated.

Values are reset every Monday for the week value and every 1st day of month for month value. This of course depends on whether the machine is turned on on those days.

If you want to store statistics externally, you can grab that file every Sunday for week value and every last day of month.

Revision history for this message
Eduards Bezverhijs (mjasnik) said :

Day values are reset every day, of course.

Revision history for this message
Ronny Roscher (d1ckb31n) said :

Great, found it :)

What time format is used in there? Limit per day is set to 4 hours between 8am and 9pm.
When is the file beeing written/refreshed? One login/logout?

# total spent time balance for today
# total actual spent for today
# total spent for this week
# total spent for this month
# last update time of the file
LAST_CHECKED = 2020-12-17 18:33:32

Revision history for this message
Best Eduards Bezverhijs (mjasnik) said :

All number values are in seconds, file is updated every 30 secs, if you did not change that in settings.

Revision history for this message
Ronny Roscher (d1ckb31n) said :

Thanks Eduards Bezverhijs, that solved my question.