Usage Report

Hey Guys I need help quick!

Our regular SYSOP is ill and I've been assigned
the job of creating a usage report.

I've got to figure out who has logged on in the
last month and how long they were logged on.

Use the 'last' command.

The 'last' command doesn't help much since I need
to have a summary of each user's total time online
and number of logins for an entire month.

The previous report looked like this:

          	           time              \#logins

ab 3:17:29 23
...
val������������ ��������� 73:58:12������������ 82

I'm pretty sure it wasn't created by a script.

Really? On my systems, last provides the username, when they logged in, from where, on what tty, when they logged off, and total time spent logged in (so you dont have to calculate yourself).

Seems like this fits your needs. You would have to either write a script, or add the totals by hand to get the output you want.

PxT is correct. Here are some examples:

root pts/0 ibs.silkroad.com Thu Mar 22 20:30 still logged in
root pts/0 ibs.silkroad.com Wed Mar 21 22:11 - 00:31 (02:19)
root pts/0 ibs.silkroad.com Wed Mar 21 17:21 - 18:38 (01:16)
root pts/0 ibs.silkroad.com Wed Mar 21 09:05 - 14:08 (05:02)
root pts/1 ibs.silkroad.com Tue Mar 20 22:23 - 01:22 (02:58)

I think last works quite nicely and more details can come from either a wrapper script or the command line switches for last (man on last for details)