Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Visualizing Sleeping Patterns on OS X (pedrobot.com)
24 points by pjin on April 26, 2012 | hide | past | favorite | 7 comments


The parse.awk script fails on Linux (no -j option to date). I didn't manage to decode what the date command does in the awk script, so I just used the python script instead.

It might be interesting to allow parsing for specific events rather than just when the kernel is logging vs. when it's not.


OS X uses FreeBSD date which has totally different cmdline options. I did actually write an awk script that works on Centos 6, I'll upload that shortly. (Edit: I think instead of -jf, you can use --date= on linux.)

The event suggestion is good. Really I just threw the script together last month and occasionally fixed it up when I showed it to friends, so maybe I'll take some time to add that and fix some other things about this (like a prettier graph ^) when I finish my last stretch of schoolwork in the next few weeks. But in the mean time feel free to add that if you want :)


I'll take a look this evening at trying to get it to parse specific events. Like you, it's busy times at the moment.


Something's wrong with the layout on Lion and Safari 5.1.5. http://imgur.com/LapyS


Thanks, I think it's fixed. Unless I introduced another bug.


Wolfram's graphs were prettier :)


True. He does have about a lot more data over a 40x longer time interval, so the noise smoothes itself out more.

Unless you also mean I should have formatted the matplotlib graph better? Mathematica actually has quite nice plotting in general. I also wanted to use d3.js but that sort of defeats the purpose of personal data.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: