Git Product home page Git Product logo

kextlog's Introduction

Mac OS X Kext Logging for Fun and Profit

Kernel extensions in Mac OS X ("kexts") log to the file /var/log/kernel.log which is backed up somewhat infrequently. On my machine, I have backed up logs dating from 6 months ago at the latest. Since my machine usage is probably very anti-correlated with my sleeping, I decided to use kext logging to plot my sleep schedule as a function of time.

This is sort of a response to http://blog.stephenwolfram.com/2012/03/the-personal-analytics-of-my-life/ but using my own machine's tools and data without relying on external services for data collection, analysis, and visualization.

Requirements

awk, python, numpy, matplotlib

Usage

At the moment, while logged in as peter, running

./generate
./plot.py

will put the logs in a directory peter, run the awk script on the logs, and then display a 2D histogram.

Example

Here's the histogram for my own logs going back to September 3, 2011:

Peter's messed up sleep schedule

TODO

  • The python log parsing script is a lot faster than the awk script, but there's a problem with getting the right timezone. I'll figure it out another time.
  • There's no persistence. I think what it should do is save your new logfiles every time you call ./generate or whatever it becomes.

kextlog's People

Contributors

peterhj avatar

Stargazers

Angus H. avatar David Leon Gil avatar priska avatar Bruno Lazzaro avatar Pierre Cazenave avatar Joost Plattel avatar  avatar José Netto avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.