README.md in instrumental_tools-0.4.2 vs README.md in instrumental_tools-0.5.0
- old
+ new
@@ -1,37 +1,45 @@
# Instrumental Tools
-A collection of scripts useful in monitoring servers and services with Instrumental ([www.instrumentalapp.com](http://www.instrumentalapp.com/)).
+A collection of scripts useful for monitoring servers and services with Instrumental ([www.instrumentalapp.com](http://www.instrumentalapp.com/)).
## instrument_server
-Use to monitor server activity by collecting information on CPU and memory usage, disk IO, filesystem usage, etc. Execute with:
+Monitor server activity by collecting information on CPU and memory usage, disk IO, filesystem usage, etc.
+Basic usage:
+
```sh
instrument_server -k <API_KEY>
```
The API key can also be provided by setting the INSTRUMENTAL_TOKEN environment variable, which eliminates the need to supply the key via command line option.
-NOTE for Mac OS users: Due to a bug in Ruby, instrument_server can occasionally deadlock ([bug report](http://bugs.ruby-lang.org/issues/5811)).
+By default, instrument_server will use the hostname of the current host when reporting metrics, e.g. 'hostname.cpu.in_use'. To specify a different hostname:
-## instrumental
+```sh
+instrument_server -k <API_KEY> -H <HOSTNAME>
+```
-Output text graphs of the different metrics in your project.
+### Running as a Daemon
-See all options with: `instrumental --help`
+To start instrument_server as a daemon:
-## gitstrumental
+```
+instrument_server -k <API_KEY> -d
+```
-Collect statistics on commit counts in a given git repo. Execute in the repo directory with:
+While the -d flag alone is sufficient for starting instrument_server as a daemon, use of additional parameters allows interaction with the running daemon process:
-```sh
-gitstrumental [API_KEY]
-```
+* start, stop, restart - run, halt, or restart the daemon
+* status - display daemon status (running, stopped)
+* clean - remove any files created by the daemon
+* kill - forcibly halt the daemon and remove its pid file
-## Capistrano Integration
+### Capistrano Integration
+
Add `require "instrumental_tools/capistrano"` to your capistrano
configuration and instrument_server will be restarted after your
deploy is finished. Additionally, you will need to add a new variable
to your capistrano file.
@@ -51,6 +59,19 @@
limit the servers on which you restart the server, you can do
something like this in your capistrano configuration:
```ruby
namespaces[:instrumental].tasks[:restart_instrument_server].options[:roles] = [:web, :worker]
+```
+
+### NOTEs
+
+Mac OS users: Due to a bug in Ruby, instrument_server can occasionally deadlock ([bug report](http://bugs.ruby-lang.org/issues/5811)).
+
+## gitstrumental
+
+Collect commit counts from git repositories:
+
+```sh
+cd project_directory
+gitstrumental <API_KEY>
```