Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goerz/activity_logger
Scripts to log and analyze computer usage
https://github.com/goerz/activity_logger
mac quantified-self
Last synced: 2 months ago
JSON representation
Scripts to log and analyze computer usage
- Host: GitHub
- URL: https://github.com/goerz/activity_logger
- Owner: goerz
- Created: 2010-09-17T11:35:45.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2015-03-07T19:16:53.000Z (almost 10 years ago)
- Last Synced: 2024-08-08T00:43:04.086Z (4 months ago)
- Topics: mac, quantified-self
- Language: Perl
- Homepage:
- Size: 125 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
- project-awesome - goerz/activity_logger - Scripts to log and analyze computer usage (Perl)
README
# activity_logger
[http://github.com/goerz/activity_logger](http://github.com/goerz/activity_logger)
Author: [Michael Goerz](http://michaelgoerz.net)
Collection of scripts to log and analyze computer usage on Mac OS X
`activity_logger.pl` runs in the background and monitors when the computer is
active or idle, and which program is in the foreground. It will store this data
in a log file.Several scripts are provided to aid in the analysis of the logged data.
This code is licensed under the [GPL](http://www.gnu.org/licenses/gpl.html)
## Install ##
Store the `activity_logger.pl` script anywhere in your `$PATH`. Edit it to set
the user to monitor and the location where log files should be stored.Run it in the background by setting a launch agent. For example put a file
`net.michaelgoerz.activity_logger.plist` in `~/Library/LaunchAgents` with the
following content (adapt to your home directory path):
KeepAlive
Label
net.michaelgoerz.activity_logger
ProgramArguments
/Users/goerz/bin/activity_logger.pl
You can also do this with [Lingon](http://lingon.sourceforge.net/).
Note that that this software will only work on Mac OS X.
## Usage ##
### Activity Logger
Keep `activity_logger.pl` running in the background (see above). Information
about the system activity will be stored in a (monthly) log file. Each line in
the log file is a "switching event". There are three columns. The first column
is the time stamp in epoch second, the second column is an integer code ('1'
for 'computer is active', '0' for 'computer is idle', '-1' for 'computer is
off/sleeping or activity_logger.pl is not running'). The third column is the
name of the active application, in the case that the computer is active. Each
event entry marks the start of that event; an event ends with the start of the
following event.