Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

log of computer statistics at university

log of computer statistics at university

log of computer statistics at university

Hello everybody.

I dont know if this is the best place to ask, and the moderator is asked to put this wherever he think it belongs.

Im going to make a system which logs the use of the public computers at my university. I want statistics over when each computer is used, and for how long.
The computerlab admin wants access to a (i.e basic html) webpage where he can read statistics about:
-which machines are being used,
-historically how much are the machines used
-how much each computerlab is used (which computerlab who has the most visitors).
This information is used to find out:
-when can we do maintenance on the PCs (in what time during the day are there least visitors)
-do we need more/less computerlabs in certain areas at campus
-are there any computers that is not being used at all and can be
Ive figured out that one way to to it is to make a program which is automatically run at startup as a service/process, and sends information to an external server.
But the best way to do this would be implementing some script/log at the the server which receives a promt for user confirmation. We use AD to logon (and SMS to distribute programs), and to log on to a public PC you have to log on to a domian where your userdata is stored, say www.win.uni.com.

Ive never done anything like this before, so im a total newb at this.
But if anyone is willing to point me in the right direction, i would be truly grateful.


RE: log of computer statistics at university

We do a few of these things, although use eDirectory and Zenworks rather than Active directory/SMS.

Some of these things are fairly easy:
Which machines are being used - entry in login script that writes login id, computer name, login date/time to a  database running on a server on your network (SQL express or MySQL will be good enough for this, but if you have a decent sql server box with extra capacity feel free to use this).

Over time this will give you details of how much is used over time (you could also analyse the windows event logs on the workstations for logon / logoff events as well).

If your workstation naming convention includes a lab identifier then you can group on this in your reports; if not you will need a table linking computer names to room names.  Your reporting for your lab techs can take data from these tables, so it is live.
Be sure when writing your reports to exclude any scheduled classes taking place in those rooms.

Regarding maintenance - can I suggest a routine schedule of maintenance that encompasses everything you are likely to need. During that time - and this varies each month - anything from workstation reimaging and patching, server patching and reboots, DNS reconfiguration, switch recabling etc is done.
This is published well in advance to allow people to work around it, including details of who (in terms of buildings, departments, corridors etc, applications / services) will be affected.
Normally ours is 6:00 - 9:00pm on the first Wednesday of the month, but occasionally it is changed (eg if that week has lots of student coursework submission dates).
Depending on what is done, the relevant IT staff work late but get time off in lieu sometime over the next couple of weeks or so - so you don't want everybody involved so people are available the following day - but be sure that those in leave notes over what happened and anything to take account of.

For anything that's too big to do overnight its typically done over a weekend.

Regarding student numbers, if you have an IT helpdesk office, when students come in asking for help, ask them about it - possibly have a general student survey.


RE: log of computer statistics at university

Thank you very much for your reply. Do you know of any guides on how to make such a logfile and write this into DB?

RE: log of computer statistics at university

Your basic database will have the following tables:




Obviously you will need more detailed information. First populate the Computers and Rooms tables, then have a vbscript script run from your login script to write the data in.
Code samples to use VBScript to run ADO database code are at:

I would strongly recommend using a stored procedure to add the row to the table, rather than an "addnew" and populating the fields, or running an insert query; this way the account used to connect to the database server (for logging information) can be very limited.



RE: log of computer statistics at university

Star for you John for a great reply.

RE: log of computer statistics at university

Thank you very much. I have now come up with a solution im going to work with this summer. Its a quite simple one, and it does indeed include some of your tips, John.
When a user login, a batch script will write %time%, %date%, %username%, %computername% into a .txt file. The same thing will happen on logout. Then i will create an .exe file who is run at startup, and reads the lines corresponding to the computers last login/logout, and send this information to a mySQL DB.
The only problem i can come up with is that the time and/or date will depend on the time of the induvidual computer, and may not always be intact.

RE: log of computer statistics at university

If you have an active directory network, ensure the time is correct on your domain controllers then this will filter out to the workstations.
Your network admins will be able to help more.

If they want to go the whole hog, they can time sync the DC's to an atomic clock.


RE: log of computer statistics at university

Another quick thought:

Even with DCs and workstations synced to within a few minutes (a requirement for active directory's kerberos authentication), there is one source of time that is the same for all - that on the database server.
To use this all you need is to have a serverdate field in your Logins table, and populate it with the server date/time (as a default value) pulled from the server's clock.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close