Coder Social home page Coder Social logo

batlog's Introduction

batlog

Tracking your Mac's battery useage, with data saved every minute!

As an example, includes 1 Year of my 2012 MacBook Air's. See blog post here: http://www.ifweassume.com/2013/08/the-de-evolution-of-my-laptop-battery.html

Note: The data file is a litle ugly, but nothing a simple parser can't fix.

#Install Guide

To run the script yourself, first download the battest.sh file. I renamed it using my terminal to be a hidden file like so:

$ mv battest.sh .battest.sh

Next, set up your cron jobs using crontab. You can directly edit your current cron jobs by typing this in to the Terminal:

$ crontab -e

and enter this line:

* * * * * /path/to/your/repo/.battest.sh

or if you didn't rename it to be hidden, add this line:

* * * * * /path/to/your/repo/battest.sh

However, if you have lots of various cron jobs like me running, you might want to keep a file sitting around with all your cron jobs listed out. I have another hidden file in my home directory called .cron.username (replace username, of course) that is full of these cron job lines, like above. You could call this file anything you want, and just use TextEdit to create it if you like. Just create this file with one line in it:

* * * * * /path/to/your/repo/.battest.sh 

and then tell cron to look at it by typing:

$ crontab .cron.username

At any time you can see what is in your cron job list by typing:

$ crontab -l

Happy data gathering!

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.