User Tracking and Logon Agents

We believe that tracking when users log into a computer is very good information.  We can easily look up where students log in, track computer usage, aid with helpdesk tasks, etc.  Our primary focus was to show that computer labs and carts are being used, and justify the 1:1 initiative we set forth.

This is was not a difficult task to setup but could be useful to others, so here it is!

First we need a good way to get data from the clients.  With Linux, we could do it a multitude of ways, with windows, it can be a bit limited.  We chose to do our data submission with a simple URL get.  Simple, easy, fast, reliable.  With some reading, it wasn’t too difficult to setup with Windows.

First… Server recording
We need a simple script to take variables and insert them into mysql with the needed information. Really all we need is the computer name and username.  We can use the server time and get the client’s IP from the server so that we know it is consistent.  Here is the server script:

MySQL Database Structure
Using the server side script we can see who the IP was of the user submitting the record, time stamp that event, see who the user is, and what the hostname of the computer is.
loa

Linux Logon Agent
The Linux logon agent could be written many different ways using several programs; curl, wget, lynx, etc.  Simply put it needs to pull two variables and curl that URL…  This needs to be put in the users (and/or skel’s) startup so that it runs at logon   This could be done in a single command like:

Windows Logon Agent
Unfortunately windows does not have awesome tools like wget, curl, lynx, etc so it is a bit more in-depth to get it working.  However it is easier to deploy using group policy on the server, you can deploy this script pretty easily. Put this script in the User Logon scripts:

Searching For Data!
This is a simple search web tool we created to locate user/computer/IP history.

Its complimentary style.css:

Custom Reports…
Once you have this information you should be able to run reports however you see fit.  We have created a highly custom report for our use which is specific to our school that shows computer usage.  That code is not ready to be posted at this time however here is a glimpse of what could be done.  Please note that ltcart1,2204, and 2506 have been physically relocated to other rooms but because database entries exists, they show up as 0.
report

With this report we can see that with 30 calendar days, there have been 22 instructional days.  This shows that these rooms are using computers almost every day!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you an intelligent human being? * Time limit is exhausted. Please reload CAPTCHA.

Post Navigation