Embedded usage statistics

Asked by Ronny Roscher

Hi,
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.

Ronny

Question information

Language:
English Edit question
Status:
Solved
For:
Timekpr-nExT Edit question
Assignee:
Eduards Bezverhijs Edit question
Solved by:
Eduards Bezverhijs
Solved:
Last query:
Last reply:
Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#1

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 :
#2

Day values are reset every day, of course.

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

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
TIME_SPENT_BALANCE = 325
# total actual spent for today
TIME_SPENT_DAY = 325
# total spent for this week
TIME_SPENT_WEEK = 22290
# total spent for this month
TIME_SPENT_MONTH = 29287
# last update time of the file
LAST_CHECKED = 2020-12-17 18:33:32

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

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 :
#5

Thanks Eduards Bezverhijs, that solved my question.