On Fri, Jan 31, 2014 at 8:46 AM, Alan Young <[email protected]> wrote:
> I can use the output I get from my howlong program--actually, I'd
> massage the data a little differently--but I wanted to make sure I
> wasn't reinventing the wheel.
>
> What I need, whether it exists somewhere or I need to write it, is a
> report of how long people have been on the computer today (along with
> times), by week and by month.  I know about wtmp and utmp, I'd either
> have to parse the output of last, which might be simpler; or access
> those files and handle all the various issues with that.
> --
> Alan Young

Have you looked at timekpr
(http://home.roadrunner.com/~crjackson/timekpr/
https://launchpad.net/timekpr)?  It will actually give kids advanced
warning, then kick them off when their time allotment is used up.
Even if you don't use that feature, it still tracks all users' logged
in time.  I think it even counts them as logged in if their session is
in the background and someone else has "logged in as different user."

I haven't looked at how the current version tracks logged in users,
but it's python, so it should be pretty obvious.  It currently throws
away daily usage stats every day, but it might be simple to archive
those records.

Oh, and it doesn't record the times, just the length.

FWIW,
Barry

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to