ganymed 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ganymed/collectors/cpu.rb +1 -1
- data/lib/ganymed/collectors/network.rb +1 -1
- data/lib/ganymed/collectors/process.rb +1 -1
- data/lib/ganymed/collectors/uptime.rb +1 -1
- data/lib/ganymed/master.rb +27 -40
- data/lib/ganymed/mongodb.rb +2 -2
- data/lib/ganymed/version.rb +1 -1
- metadata +31 -31
@@ -4,7 +4,7 @@ Struct.new("NetworkStat", :dev,
|
|
4
4
|
:wbytes, :wpackets, :werrs, :wdrop, :wfifo, :wcolls, :wcarrier, :wcompressed)
|
5
5
|
|
6
6
|
collect do
|
7
|
-
|
7
|
+
next if not File.readable?('/proc/net/dev')
|
8
8
|
|
9
9
|
File.open('/proc/net/dev') do |file|
|
10
10
|
file.each do |line|
|
data/lib/ganymed/master.rb
CHANGED
@@ -31,15 +31,6 @@ module Ganymed
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def run
|
34
|
-
if pid = Process.fork
|
35
|
-
@supervisor = true
|
36
|
-
Process.wait(pid)
|
37
|
-
else
|
38
|
-
child
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def child
|
43
34
|
log.info("starting Ganymed reactor in #{Env.mode} mode")
|
44
35
|
|
45
36
|
# configure eventmachine
|
@@ -57,23 +48,21 @@ module Ganymed
|
|
57
48
|
end
|
58
49
|
|
59
50
|
def before_starting
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
end
|
51
|
+
if config.profiling.perftools
|
52
|
+
log.info("activating PerfTools CPU profiler")
|
53
|
+
require 'perftools'
|
54
|
+
PerfTools::CpuProfiler.start('profile')
|
55
|
+
end
|
66
56
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
57
|
+
if config.profiling.gcprofiler
|
58
|
+
log.info("activating GC::Profiler")
|
59
|
+
GC::Profiler.enable
|
60
|
+
end
|
71
61
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
62
|
+
if config.profiling.rubyprof
|
63
|
+
require 'ruby-prof'
|
64
|
+
log.info("activating RubyProf")
|
65
|
+
RubyProf.start
|
77
66
|
end
|
78
67
|
end
|
79
68
|
|
@@ -85,23 +74,21 @@ module Ganymed
|
|
85
74
|
end
|
86
75
|
|
87
76
|
def after_stopping
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
end
|
77
|
+
if config.profiling.perftools
|
78
|
+
PerfTools::CpuProfiler.stop
|
79
|
+
`pprof.rb --svg profile > profile.svg`
|
80
|
+
end
|
93
81
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
end
|
82
|
+
if config.profiling.rubyprof
|
83
|
+
result = RubyProf.stop
|
84
|
+
result.eliminate_methods!([
|
85
|
+
/Queue#pop/,
|
86
|
+
/Queue#push/,
|
87
|
+
/Mutex#synchronize/,
|
88
|
+
/Mutex#sleep/,
|
89
|
+
])
|
90
|
+
printer = RubyProf::MultiPrinter.new(result)
|
91
|
+
printer.print(:path => "prof", :profile => "ganymed")
|
105
92
|
end
|
106
93
|
|
107
94
|
log.info("done shutting down. exiting ...")
|
data/lib/ganymed/mongodb.rb
CHANGED
data/lib/ganymed/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ganymed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-06-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &7558920 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *7558920
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: eventmachine
|
27
|
-
requirement: &
|
27
|
+
requirement: &7557220 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.12.10
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *7557220
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: ganymed-client
|
38
|
-
requirement: &
|
38
|
+
requirement: &7555900 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.2.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *7555900
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: madvertise-ext
|
49
|
-
requirement: &
|
49
|
+
requirement: &7554720 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.1.2
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *7554720
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: madvertise-logging
|
60
|
-
requirement: &
|
60
|
+
requirement: &7553740 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.3.2
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *7553740
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mixlib-cli
|
71
|
-
requirement: &
|
71
|
+
requirement: &7553220 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *7553220
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: RubyInline
|
82
|
-
requirement: &
|
82
|
+
requirement: &7567900 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *7567900
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: servolux
|
93
|
-
requirement: &
|
93
|
+
requirement: &7566640 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *7566640
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: msgpack
|
104
|
-
requirement: &
|
104
|
+
requirement: &7564920 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *7564920
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: mongo
|
115
|
-
requirement: &
|
115
|
+
requirement: &7562960 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '1.6'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *7562960
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: em-websocket
|
126
|
-
requirement: &
|
126
|
+
requirement: &7561620 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *7561620
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: yajl-ruby
|
137
|
-
requirement: &
|
137
|
+
requirement: &7592340 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: '0'
|
143
143
|
type: :runtime
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *7592340
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: sys-filesystem
|
148
|
-
requirement: &
|
148
|
+
requirement: &7591700 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ! '>='
|
@@ -153,10 +153,10 @@ dependencies:
|
|
153
153
|
version: '0'
|
154
154
|
type: :runtime
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *7591700
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: ohai
|
159
|
-
requirement: &
|
159
|
+
requirement: &7590960 !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|
162
162
|
- - ! '>='
|
@@ -164,7 +164,7 @@ dependencies:
|
|
164
164
|
version: 0.6.12
|
165
165
|
type: :runtime
|
166
166
|
prerelease: false
|
167
|
-
version_requirements: *
|
167
|
+
version_requirements: *7590960
|
168
168
|
description: Ganymed is an event collection daemon
|
169
169
|
email:
|
170
170
|
- bb@xnull.de
|
@@ -239,7 +239,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
239
239
|
version: '0'
|
240
240
|
segments:
|
241
241
|
- 0
|
242
|
-
hash:
|
242
|
+
hash: -4196854861267997123
|
243
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
244
|
none: false
|
245
245
|
requirements:
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
version: '0'
|
249
249
|
segments:
|
250
250
|
- 0
|
251
|
-
hash:
|
251
|
+
hash: -4196854861267997123
|
252
252
|
requirements: []
|
253
253
|
rubyforge_project:
|
254
254
|
rubygems_version: 1.8.17
|