Author Topic: Uptime Script in development  (Read 3861 times)

Cytochromec

  • Full Member
  • ***
  • Posts: 46
    • View Profile
Uptime Script in development
« on: December 07, 2012, 02:37:39 PM »
Howdy Ubermix Community,

I am working on a script to log computer use. One of the issues we have had with previous computer deployments is that it is hard to keep track of how often the computers are being used so that we can provide support and training to teachers with carts that are more idle than their peers.

What I have done so far is modified a few files that are pushed out to the Ubermix computers to record when the computer: sleeps, wakes, boots, turns off, restarts, wifi connects, and wifi disconnects. The computer then sends this information (along with its name) to an online database (MySQL). Then there are several steps to process this raw log information into a format that makes sense (using PHP), but essentially now I can set a date range and I can see how much a particular computer cart has been used.

I am working on polishing it up so it is more usable to me, and could possibly get it to a state that other folks could use (if you are already using the network update.sh and have access to a webserver). If you are interested or have other methods you are using for recording usage of laptops in your school, I would love to hear about it.

Juan Pucheu

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Uptime Script in development
« Reply #1 on: May 08, 2013, 01:01:53 PM »
Have you check zeitgeist datahub logs ?
It could be useful, and it's enabled by default.

urkomasse

  • Full Member
  • ***
  • Posts: 83
    • View Profile
Re: Uptime Script in development
« Reply #2 on: May 08, 2013, 08:46:21 PM »
Not necessarily related to your uptime script, but as a good inventory option, I just deployed the Fusion Inventory agent from here:
http://www.fusioninventory.org/overview/
It reports to our existing GLPI server through a plugin on the server.

Here is GLPI:
http://www.glpi-project.org/

Through this I get a really nice database of all the laptops, including hardware and software inventory details.
Very recommended.

Juan Pucheu

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Uptime Script in development
« Reply #3 on: May 09, 2013, 11:48:22 AM »
Very nice! it's difficult to integrate with ubermix ?


urkomasse

  • Full Member
  • ***
  • Posts: 83
    • View Profile
Re: Uptime Script in development
« Reply #4 on: May 09, 2013, 11:34:55 PM »
No, I found it quite easy.

I did it through remote updates:
- Add the package repository
- Add the signing key for the repository
- apt-get update, apt-get install fusioninventory-agent (see the instructions on their website)
- Then I overwrite the /etc/fusioninventory/agent.cfg file with my own.
- I also deleted the /etc/cron.daily/fusioninventory-agent file, and added a modified one to /etc/cron.d/ so it runs every 4h instead of once per day, but that's optional.