evented_bluepill 0.0.47 → 0.0.50
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +14 -0
- data/DESIGN.md +2 -2
- data/README.md +35 -37
- data/Rakefile +9 -0
- data/bin/bluepill +9 -102
- data/bin/evented_bluepill +13 -0
- data/evented_bluepill.gemspec +10 -6
- data/{lib → example}/example.rb +4 -7
- data/{lib → example}/runit_example.rb +2 -2
- data/{bin → example}/sample_forking_server +2 -2
- data/lib/bluepill.rb +3 -31
- data/lib/{bluepill → evented_bluepill}/application/client.rb +1 -1
- data/lib/evented_bluepill/application/server.rb +24 -0
- data/lib/{bluepill → evented_bluepill}/application.rb +14 -14
- data/lib/{bluepill → evented_bluepill}/controller.rb +30 -20
- data/lib/{bluepill → evented_bluepill}/dsl/app_proxy.rb +3 -3
- data/lib/{bluepill → evented_bluepill}/dsl/process_factory.rb +8 -5
- data/lib/{bluepill → evented_bluepill}/dsl/process_proxy.rb +3 -3
- data/lib/{bluepill → evented_bluepill}/dsl.rb +5 -2
- data/lib/{bluepill → evented_bluepill}/event.rb +1 -1
- data/lib/{bluepill → evented_bluepill}/group.rb +2 -2
- data/lib/{bluepill → evented_bluepill}/logger.rb +5 -2
- data/lib/evented_bluepill/options.rb +121 -0
- data/lib/{bluepill → evented_bluepill}/process.rb +12 -16
- data/lib/{bluepill → evented_bluepill}/process_conditions/always_true.rb +7 -3
- data/lib/evented_bluepill/process_conditions/cpu_usage.rb +25 -0
- data/lib/{bluepill → evented_bluepill}/process_conditions/http.rb +8 -3
- data/lib/evented_bluepill/process_conditions/mem_usage.rb +41 -0
- data/lib/evented_bluepill/process_conditions/process_condition.rb +72 -0
- data/lib/{bluepill → evented_bluepill}/process_conditions.rb +2 -2
- data/lib/{bluepill → evented_bluepill}/process_statistics.rb +10 -10
- data/lib/{bluepill → evented_bluepill}/socket.rb +2 -1
- data/lib/{bluepill → evented_bluepill}/system.rb +24 -21
- data/lib/{bluepill → evented_bluepill}/trigger.rb +4 -4
- data/lib/{bluepill → evented_bluepill}/triggers/flapping.rb +3 -8
- data/lib/evented_bluepill/util/rotational_array.rb +21 -0
- data/lib/evented_bluepill/version.rb +12 -0
- data/lib/evented_bluepill.rb +22 -0
- data/spec/always_true_spec.rb +19 -0
- data/spec/cpu_usage_spec.rb +28 -0
- data/spec/mem_usage_spec.rb +46 -0
- data/spec/process_condition_spec.rb +30 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/system_spec.rb +15 -0
- metadata +137 -122
- data/lib/bluepill/application/server.rb +0 -26
- data/lib/bluepill/condition_watch.rb +0 -61
- data/lib/bluepill/process_conditions/cpu_usage.rb +0 -20
- data/lib/bluepill/process_conditions/mem_usage.rb +0 -33
- data/lib/bluepill/process_conditions/process_condition.rb +0 -23
- data/lib/bluepill/util/rotational_array.rb +0 -74
- data/lib/bluepill/version.rb +0 -5
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
require 'etc'
|
4
4
|
require 'shellwords'
|
5
|
+
require 'daemons'
|
5
6
|
|
6
|
-
module
|
7
|
-
# This class represents the system that
|
7
|
+
module EventedBluepill
|
8
|
+
# This class represents the system that evented_bluepill is running on.. It's mainly used to memoize
|
8
9
|
# results of running ps auxx etc so that every watch in the every process will not result in a fork
|
9
10
|
module System
|
10
11
|
APPEND_MODE = "a"
|
@@ -169,26 +170,8 @@ module Bluepill
|
|
169
170
|
end
|
170
171
|
end
|
171
172
|
|
172
|
-
def ps_axu
|
173
|
-
return @store if @valid_until and @valid_until >= Time.now
|
174
|
-
@valid_until = Time.now + SECONDS_VALID
|
175
|
-
|
176
|
-
@store = begin
|
177
|
-
# BSD style ps invocation
|
178
|
-
lines = `ps axo pid=,ppid=,pcpu=,rss=`.split("\n")
|
179
|
-
|
180
|
-
lines.inject(Hash.new) do |mem, line|
|
181
|
-
chunks = line.split(/\s+/)
|
182
|
-
chunks.delete_if {|c| c.strip.empty? }
|
183
|
-
pid = chunks[IDX_MAP[:pid]].strip.to_i
|
184
|
-
mem[pid] = chunks
|
185
|
-
mem
|
186
|
-
end
|
187
|
-
end
|
188
|
-
end
|
189
|
-
|
190
173
|
# be sure to call this from a fork otherwise it will modify the attributes
|
191
|
-
# of the
|
174
|
+
# of the evented_bluepill daemon
|
192
175
|
def drop_privileges(uid, gid)
|
193
176
|
if ::Process::Sys.geteuid == 0
|
194
177
|
uid_num = Etc.getpwnam(uid).uid if uid
|
@@ -223,5 +206,25 @@ module Bluepill
|
|
223
206
|
$stderr.reopen(io_err, APPEND_MODE) if io_err
|
224
207
|
end
|
225
208
|
end
|
209
|
+
|
210
|
+
private
|
211
|
+
|
212
|
+
def ps_axu
|
213
|
+
return @store if @valid_until and @valid_until >= Time.now
|
214
|
+
@valid_until = Time.now + SECONDS_VALID
|
215
|
+
|
216
|
+
@store = begin
|
217
|
+
# BSD style ps invocation
|
218
|
+
lines = `ps axo pid,ppid,pcpu,rss`.split("\n")
|
219
|
+
|
220
|
+
lines.inject(Hash.new) do |mem, line|
|
221
|
+
chunks = line.split(/\s+/)
|
222
|
+
chunks.delete_if {|c| c.strip.empty? }
|
223
|
+
pid = chunks[IDX_MAP[:pid]].strip.to_i
|
224
|
+
mem[pid] = chunks
|
225
|
+
mem
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
226
229
|
end
|
227
230
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
|
-
require 'active_support'
|
3
|
+
require 'active_support/core_ext/string/inflections'
|
4
4
|
|
5
|
-
module
|
5
|
+
module EventedBluepill
|
6
6
|
class TriggerTimer < Coolio::TimerWatcher
|
7
7
|
def initialize(trigger, event, delay)
|
8
8
|
@trigger = trigger
|
@@ -57,10 +57,10 @@ module Bluepill
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def schedule_event(event, delay)
|
60
|
-
timer =
|
60
|
+
timer = EventedBluepill::TriggerTimer.new(self, event, delay)
|
61
61
|
self.scheduled_events << timer
|
62
62
|
|
63
|
-
|
63
|
+
EventedBluepill::Event.attach(timer)
|
64
64
|
end
|
65
65
|
|
66
66
|
def cancel_all_events
|
@@ -1,10 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
|
-
module
|
3
|
+
module EventedBluepill
|
4
4
|
module Triggers
|
5
|
-
class Flapping <
|
5
|
+
class Flapping < EventedBluepill::Trigger
|
6
6
|
TRIGGER_STATES = [:starting, :restarting]
|
7
|
-
|
8
7
|
PARAMS = [:times, :within, :retry_in]
|
9
8
|
|
10
9
|
attr_accessor *PARAMS
|
@@ -34,19 +33,15 @@ module Bluepill
|
|
34
33
|
end
|
35
34
|
|
36
35
|
def check_flapping
|
37
|
-
num_occurances = (@timeline.nitems == self.times)
|
38
|
-
|
39
36
|
# The process has not flapped if we haven't encountered enough incidents
|
40
|
-
return unless
|
37
|
+
return unless (@timeline.compact.length == self.times)
|
41
38
|
|
42
39
|
# Check if the incident happend within the timeframe
|
43
40
|
duration = (@timeline.last - @timeline.first) <= self.within
|
44
41
|
|
45
42
|
if duration
|
46
43
|
self.logger.info "Flapping detected: retrying in #{self.retry_in} seconds"
|
47
|
-
|
48
44
|
self.schedule_event(:start, self.retry_in)
|
49
|
-
|
50
45
|
self.dispatch!(:unmonitor)
|
51
46
|
|
52
47
|
@timeline.clear
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
module EventedBluepill
|
4
|
+
module Util
|
5
|
+
class RotationalArray < Array
|
6
|
+
def initialize(size)
|
7
|
+
@capacity = size
|
8
|
+
|
9
|
+
super() # no size - intentionally
|
10
|
+
end
|
11
|
+
|
12
|
+
def push(value)
|
13
|
+
super(value)
|
14
|
+
|
15
|
+
self.shift if self.length > @capacity
|
16
|
+
self
|
17
|
+
end
|
18
|
+
alias_method :<<, :push
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'evented_bluepill/event'
|
4
|
+
require 'evented_bluepill/application'
|
5
|
+
require 'evented_bluepill/controller'
|
6
|
+
require 'evented_bluepill/socket'
|
7
|
+
require 'evented_bluepill/process'
|
8
|
+
require 'evented_bluepill/process_statistics'
|
9
|
+
require 'evented_bluepill/group'
|
10
|
+
require 'evented_bluepill/logger'
|
11
|
+
require 'evented_bluepill/trigger'
|
12
|
+
require 'evented_bluepill/triggers/flapping'
|
13
|
+
require 'evented_bluepill/dsl/process_factory'
|
14
|
+
require 'evented_bluepill/dsl/process_proxy'
|
15
|
+
require 'evented_bluepill/dsl/app_proxy'
|
16
|
+
require 'evented_bluepill/dsl'
|
17
|
+
require 'evented_bluepill/system'
|
18
|
+
|
19
|
+
require 'evented_bluepill/process_conditions'
|
20
|
+
require 'evented_bluepill/util/rotational_array'
|
21
|
+
|
22
|
+
require 'evented_bluepill/version'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe EventedBluepill::ProcessConditions::AlwaysTrue do
|
4
|
+
before do
|
5
|
+
@condition = EventedBluepill::ProcessConditions::AlwaysTrue.new 'name', stub(:actual_pid => 0)
|
6
|
+
end
|
7
|
+
|
8
|
+
describe "#run" do
|
9
|
+
it "must return 1" do
|
10
|
+
@condition.run.must_equal 1
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "#check" do
|
15
|
+
it "must return true" do
|
16
|
+
@condition.check(0).must_equal true
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe EventedBluepill::ProcessConditions::CpuUsage do
|
4
|
+
before do
|
5
|
+
@condition = EventedBluepill::ProcessConditions::CpuUsage.new 'name', stub(:actual_pid => 0), :below => 2
|
6
|
+
end
|
7
|
+
|
8
|
+
describe "#run" do
|
9
|
+
it "must return current cpu usage" do
|
10
|
+
EventedBluepill::System.expects(:cpu_usage).with(0).returns(1.1)
|
11
|
+
@condition.run.must_equal 1.1
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "#check" do
|
16
|
+
it "must be true if value is below threshold" do
|
17
|
+
@condition.check(0).must_equal true
|
18
|
+
end
|
19
|
+
|
20
|
+
it "must be false if value is above threshold" do
|
21
|
+
@condition.check(4).must_equal false
|
22
|
+
end
|
23
|
+
|
24
|
+
it "must be false if value is threshold" do
|
25
|
+
@condition.check(2).must_equal false
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe EventedBluepill::ProcessConditions::MemUsage do
|
4
|
+
before do
|
5
|
+
@condition = EventedBluepill::ProcessConditions::MemUsage.new 'name', stub(:actual_pid => 0), :below => 2048
|
6
|
+
end
|
7
|
+
|
8
|
+
describe "#run" do
|
9
|
+
it "must return current memory usage in kilobytes" do
|
10
|
+
EventedBluepill::System.expects(:memory_usage).with(0).returns(3)
|
11
|
+
@condition.run.must_equal 3072
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "#check" do
|
16
|
+
it "must be true if value is below threshold" do
|
17
|
+
@condition.check(0).must_equal true
|
18
|
+
end
|
19
|
+
|
20
|
+
it "must be false if value is above threshold" do
|
21
|
+
@condition.check(4096).must_equal false
|
22
|
+
end
|
23
|
+
|
24
|
+
it "must be false if value is threshold" do
|
25
|
+
@condition.check(2048).must_equal false
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "#format_value" do
|
30
|
+
it "must return value as kilobyte if below one megabyte" do
|
31
|
+
@condition.format_value(768 * 1024).must_equal '768.0KB'
|
32
|
+
end
|
33
|
+
|
34
|
+
it "must return value as megabyte if above one megabyte" do
|
35
|
+
@condition.format_value(2048 * 1024).must_equal '2.0MB'
|
36
|
+
end
|
37
|
+
|
38
|
+
it "must round value" do
|
39
|
+
@condition.format_value(2800 * 1024).must_equal '2.7MB'
|
40
|
+
end
|
41
|
+
|
42
|
+
it "must return value as megabyte if value is one megabyte" do
|
43
|
+
@condition.format_value(1024 * 1024).must_equal '1.0MB'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe EventedBluepill::ProcessConditions::ProcessCondition do
|
4
|
+
before do
|
5
|
+
@condition = EventedBluepill::ProcessConditions::ProcessCondition.new 'name', stub(:actual_pid => 0)
|
6
|
+
end
|
7
|
+
|
8
|
+
describe "#run" do
|
9
|
+
it "must raise" do
|
10
|
+
assert_raises RuntimeError do
|
11
|
+
@condition.run
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "#check" do
|
17
|
+
it "must raise" do
|
18
|
+
assert_raises RuntimeError do
|
19
|
+
@condition.check 0
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "#format_value" do
|
25
|
+
it "must return the argument" do
|
26
|
+
value = [1, 2, 3]
|
27
|
+
@condition.format_value(value).must_equal value
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/spec/system_spec.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe EventedBluepill::System do
|
4
|
+
describe "#pid_alive?" do
|
5
|
+
it "must return true if pid is alive" do
|
6
|
+
::Process.expects(:kill).with(0, 12345)
|
7
|
+
EventedBluepill::System.pid_alive?(12345).must_equal true
|
8
|
+
end
|
9
|
+
|
10
|
+
it "must return false if pid is not alive" do
|
11
|
+
::Process.expects(:kill).with(0, 12345).raises(Errno::ESRCH, 'ignore')
|
12
|
+
EventedBluepill::System.pid_alive?(12345).must_equal false
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,10 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: evented_bluepill
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 47
|
9
|
-
version: 0.0.47
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.50
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Stefan Huber
|
13
9
|
- Arya Asemanfar
|
14
10
|
- Gary Tsang
|
@@ -16,166 +12,185 @@ authors:
|
|
16
12
|
autorequire:
|
17
13
|
bindir: bin
|
18
14
|
cert_chain: []
|
19
|
-
|
20
|
-
date: 2011-01-10 00:00:00 +00:00
|
15
|
+
date: 2011-03-05 00:00:00.000000000 +00:00
|
21
16
|
default_executable:
|
22
|
-
dependencies:
|
23
|
-
- !ruby/object:Gem::Dependency
|
17
|
+
dependencies:
|
18
|
+
- !ruby/object:Gem::Dependency
|
24
19
|
name: daemons
|
25
|
-
|
26
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
requirement: &2154043060 !ruby/object:Gem::Requirement
|
27
21
|
none: false
|
28
|
-
requirements:
|
22
|
+
requirements:
|
29
23
|
- - ~>
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
|
32
|
-
- 1
|
33
|
-
- 0
|
34
|
-
- 10
|
35
|
-
version: 1.0.10
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 1.1.0
|
36
26
|
type: :runtime
|
37
|
-
version_requirements: *id001
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: blankslate
|
40
27
|
prerelease: false
|
41
|
-
|
28
|
+
version_requirements: *2154043060
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: blankslate
|
31
|
+
requirement: &2154042560 !ruby/object:Gem::Requirement
|
42
32
|
none: false
|
43
|
-
requirements:
|
33
|
+
requirements:
|
44
34
|
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
segments:
|
47
|
-
- 2
|
48
|
-
- 1
|
49
|
-
- 2
|
50
|
-
- 3
|
35
|
+
- !ruby/object:Gem::Version
|
51
36
|
version: 2.1.2.3
|
52
37
|
type: :runtime
|
53
|
-
version_requirements: *id002
|
54
|
-
- !ruby/object:Gem::Dependency
|
55
|
-
name: state_machine
|
56
38
|
prerelease: false
|
57
|
-
|
39
|
+
version_requirements: *2154042560
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: state_machine
|
42
|
+
requirement: &2154042100 !ruby/object:Gem::Requirement
|
58
43
|
none: false
|
59
|
-
requirements:
|
44
|
+
requirements:
|
60
45
|
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
|
63
|
-
- 0
|
64
|
-
- 8
|
65
|
-
- 1
|
66
|
-
version: 0.8.1
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.9.4
|
67
48
|
type: :runtime
|
68
|
-
|
69
|
-
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: *2154042100
|
51
|
+
- !ruby/object:Gem::Dependency
|
70
52
|
name: activesupport
|
53
|
+
requirement: &2154041640 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ~>
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: 3.0.0
|
59
|
+
type: :runtime
|
71
60
|
prerelease: false
|
72
|
-
|
61
|
+
version_requirements: *2154041640
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: i18n
|
64
|
+
requirement: &2154041180 !ruby/object:Gem::Requirement
|
73
65
|
none: false
|
74
|
-
requirements:
|
66
|
+
requirements:
|
75
67
|
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
- 2
|
79
|
-
- 3
|
80
|
-
- 10
|
81
|
-
version: 2.3.10
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.5.0
|
82
70
|
type: :runtime
|
83
|
-
version_requirements: *id004
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: cool.io
|
86
71
|
prerelease: false
|
87
|
-
|
72
|
+
version_requirements: *2154041180
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: cool.io
|
75
|
+
requirement: &2154040720 !ruby/object:Gem::Requirement
|
88
76
|
none: false
|
89
|
-
requirements:
|
77
|
+
requirements:
|
90
78
|
- - ~>
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
segments:
|
93
|
-
- 1
|
94
|
-
- 0
|
95
|
-
- 0
|
79
|
+
- !ruby/object:Gem::Version
|
96
80
|
version: 1.0.0
|
97
81
|
type: :runtime
|
98
|
-
|
99
|
-
|
100
|
-
|
82
|
+
prerelease: false
|
83
|
+
version_requirements: *2154040720
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: minitest
|
86
|
+
requirement: &2154040260 !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ~>
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 2.0.2
|
92
|
+
type: :development
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: *2154040260
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: mocha
|
97
|
+
requirement: &2154039800 !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ~>
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 0.9.12
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: *2154039800
|
106
|
+
description: EventedBluepill keeps your daemons up while taking up as little resources
|
107
|
+
as possible. After all you probably want the resources of your server to be used
|
108
|
+
by whatever daemons you are running rather than the thing that's supposed to make
|
109
|
+
sure they are brought back up, should they die or misbehave.
|
110
|
+
email:
|
101
111
|
- MSNexploder@gmail.com
|
102
|
-
executables:
|
112
|
+
executables:
|
103
113
|
- bluepill
|
104
|
-
-
|
114
|
+
- evented_bluepill
|
105
115
|
extensions: []
|
106
|
-
|
107
116
|
extra_rdoc_files: []
|
108
|
-
|
109
|
-
files:
|
117
|
+
files:
|
110
118
|
- .gitignore
|
119
|
+
- CHANGELOG.md
|
111
120
|
- DESIGN.md
|
112
121
|
- Gemfile
|
113
122
|
- LICENSE
|
114
123
|
- README.md
|
115
124
|
- Rakefile
|
116
125
|
- bin/bluepill
|
117
|
-
- bin/
|
126
|
+
- bin/evented_bluepill
|
118
127
|
- evented_bluepill.gemspec
|
128
|
+
- example/example.rb
|
129
|
+
- example/runit_example.rb
|
130
|
+
- example/sample_forking_server
|
119
131
|
- lib/bluepill.rb
|
120
|
-
- lib/
|
121
|
-
- lib/
|
122
|
-
- lib/
|
123
|
-
- lib/
|
124
|
-
- lib/
|
125
|
-
- lib/
|
126
|
-
- lib/
|
127
|
-
- lib/
|
128
|
-
- lib/
|
129
|
-
- lib/
|
130
|
-
- lib/
|
131
|
-
- lib/
|
132
|
-
- lib/
|
133
|
-
- lib/
|
134
|
-
- lib/
|
135
|
-
- lib/
|
136
|
-
- lib/
|
137
|
-
- lib/
|
138
|
-
- lib/
|
139
|
-
- lib/
|
140
|
-
- lib/
|
141
|
-
- lib/
|
142
|
-
- lib/
|
143
|
-
- lib/
|
144
|
-
- lib/
|
145
|
-
- lib/
|
146
|
-
- lib/
|
147
|
-
-
|
132
|
+
- lib/evented_bluepill.rb
|
133
|
+
- lib/evented_bluepill/application.rb
|
134
|
+
- lib/evented_bluepill/application/client.rb
|
135
|
+
- lib/evented_bluepill/application/server.rb
|
136
|
+
- lib/evented_bluepill/controller.rb
|
137
|
+
- lib/evented_bluepill/dsl.rb
|
138
|
+
- lib/evented_bluepill/dsl/app_proxy.rb
|
139
|
+
- lib/evented_bluepill/dsl/process_factory.rb
|
140
|
+
- lib/evented_bluepill/dsl/process_proxy.rb
|
141
|
+
- lib/evented_bluepill/event.rb
|
142
|
+
- lib/evented_bluepill/group.rb
|
143
|
+
- lib/evented_bluepill/logger.rb
|
144
|
+
- lib/evented_bluepill/options.rb
|
145
|
+
- lib/evented_bluepill/process.rb
|
146
|
+
- lib/evented_bluepill/process_conditions.rb
|
147
|
+
- lib/evented_bluepill/process_conditions/always_true.rb
|
148
|
+
- lib/evented_bluepill/process_conditions/cpu_usage.rb
|
149
|
+
- lib/evented_bluepill/process_conditions/http.rb
|
150
|
+
- lib/evented_bluepill/process_conditions/mem_usage.rb
|
151
|
+
- lib/evented_bluepill/process_conditions/process_condition.rb
|
152
|
+
- lib/evented_bluepill/process_statistics.rb
|
153
|
+
- lib/evented_bluepill/socket.rb
|
154
|
+
- lib/evented_bluepill/system.rb
|
155
|
+
- lib/evented_bluepill/trigger.rb
|
156
|
+
- lib/evented_bluepill/triggers/flapping.rb
|
157
|
+
- lib/evented_bluepill/util/rotational_array.rb
|
158
|
+
- lib/evented_bluepill/version.rb
|
159
|
+
- spec/always_true_spec.rb
|
160
|
+
- spec/cpu_usage_spec.rb
|
161
|
+
- spec/mem_usage_spec.rb
|
162
|
+
- spec/process_condition_spec.rb
|
163
|
+
- spec/spec_helper.rb
|
164
|
+
- spec/system_spec.rb
|
148
165
|
has_rdoc: true
|
149
166
|
homepage: http://github.com/msnexploder/evented_bluepill
|
150
167
|
licenses: []
|
151
|
-
|
152
168
|
post_install_message:
|
153
169
|
rdoc_options: []
|
154
|
-
|
155
|
-
require_paths:
|
170
|
+
require_paths:
|
156
171
|
- lib
|
157
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
158
173
|
none: false
|
159
|
-
requirements:
|
160
|
-
- -
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
|
163
|
-
|
164
|
-
version: "0"
|
165
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - ! '>='
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
179
|
none: false
|
167
|
-
requirements:
|
168
|
-
- -
|
169
|
-
- !ruby/object:Gem::Version
|
170
|
-
|
171
|
-
- 0
|
172
|
-
version: "0"
|
180
|
+
requirements:
|
181
|
+
- - ! '>='
|
182
|
+
- !ruby/object:Gem::Version
|
183
|
+
version: '0'
|
173
184
|
requirements: []
|
174
|
-
|
175
185
|
rubyforge_project: evented_bluepill
|
176
|
-
rubygems_version: 1.
|
186
|
+
rubygems_version: 1.6.1
|
177
187
|
signing_key:
|
178
188
|
specification_version: 3
|
179
189
|
summary: A process monitor written in Ruby with stability and minimalism in mind.
|
180
|
-
test_files:
|
181
|
-
|
190
|
+
test_files:
|
191
|
+
- spec/always_true_spec.rb
|
192
|
+
- spec/cpu_usage_spec.rb
|
193
|
+
- spec/mem_usage_spec.rb
|
194
|
+
- spec/process_condition_spec.rb
|
195
|
+
- spec/spec_helper.rb
|
196
|
+
- spec/system_spec.rb
|