README.md in bluepill-0.0.60 vs README.md in bluepill-0.0.61
- old
+ new
@@ -147,10 +147,21 @@
process.pid_file = "/tmp/some_pid_file.pid"
end
end
```
+To track resources of child processes, use :include_children:
+```ruby
+ Bluepill.application("app_name") do |app|
+ app.process("process_name") do |process|
+ process.start_command = "/usr/bin/some_start_command"
+ process.pid_file = "/tmp/some_pid_file.pid"
+ process.checks :mem_usage, :every => 1.seconds, :below => 5.megabytes, :times => [3,5], :include_children => true
+ end
+ end
+```
+
To check for flapping:
```ruby
process.checks :flapping, :times => 2, :within => 30.seconds, :retry_in => 7.seconds
```
@@ -252,26 +263,42 @@
```
The main benefit of using the config options is that Bluepill will be able to monitor the correct process instead of just watching the shell that spawned your actual server.
### CLI
-To start a bluepill process and load a config:
+#### Usage
+
+ bluepill [app_name] command [options]
+
+For the "load" command, the _app_name_ is specified in the config file, and
+must not be provided on the command line.
+
+For all other commands, the _app_name_ is optional if there is only
+one bluepill daemon running. Otherwise, the _app_name_ must be
+provided, because the command will fail when there are multiple
+bluepill daemons running. The example commands below leaves out the
+_app_name_.
+
+#### Commands
+
+To start a bluepill daemon and load the config for an application:
+
sudo bluepill load /path/to/production.pill
-To act on a process or group:
+To act on a process or group for an application:
sudo bluepill <start|stop|restart|unmonitor> <process_or_group_name>
-To view process statuses:
+To view process statuses for an application:
sudo bluepill status
-To view the log for a process or group:
+To view the log for a process or group for an application:
sudo bluepill log <process_or_group_name>
-To quit bluepill:
+To quit the bluepill daemon for an application:
sudo bluepill quit
### Logging
By default, bluepill uses syslog local6 facility as described in the installation section. But if for any reason you don't want to use syslog, you can use a log file. You can do this by setting the :log\_file option in the config: