diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:46:13 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:46:13 +0200 |
commit | 8d89651ef729e560ad96dcfc002fcde6ff7f923b (patch) | |
tree | eb5be01c25f735d12fe9881ee6327c9b7e8bbe39 /meta-linaro/recipes-extra/ganglia | |
download | meta-linaro-dizzy-enea.tar.gz |
initial commit for Enea Linux 5.0 armdizzy-enea
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-linaro/recipes-extra/ganglia')
5 files changed, 669 insertions, 0 deletions
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia/gmetad-example.conf b/meta-linaro/recipes-extra/ganglia/ganglia/gmetad-example.conf new file mode 100644 index 0000000..7f2fd7f --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia/gmetad-example.conf | |||
@@ -0,0 +1,122 @@ | |||
1 | # This is an example of a Ganglia Meta Daemon configuration file | ||
2 | # http://ganglia.sourceforge.net/ | ||
3 | # | ||
4 | #------------------------------------------------------------------------------- | ||
5 | # Setting the debug_level to 1 will keep daemon in the forground and | ||
6 | # show only error messages. Setting this value higher than 1 will make | ||
7 | # gmetad output debugging information and stay in the foreground. | ||
8 | # default: 0 | ||
9 | # debug_level 10 | ||
10 | # | ||
11 | #------------------------------------------------------------------------------- | ||
12 | # What to monitor. The most important section of this file. | ||
13 | # | ||
14 | # The data_source tag specifies either a cluster or a grid to | ||
15 | # monitor. If we detect the source is a cluster, we will maintain a complete | ||
16 | # set of RRD databases for it, which can be used to create historical | ||
17 | # graphs of the metrics. If the source is a grid (it comes from another gmetad), | ||
18 | # we will only maintain summary RRDs for it. | ||
19 | # | ||
20 | # Format: | ||
21 | # data_source "my cluster" [polling interval] address1:port addreses2:port ... | ||
22 | # | ||
23 | # The keyword 'data_source' must immediately be followed by a unique | ||
24 | # string which identifies the source, then an optional polling interval in | ||
25 | # seconds. The source will be polled at this interval on average. | ||
26 | # If the polling interval is omitted, 15sec is asssumed. | ||
27 | # | ||
28 | # A list of machines which service the data source follows, in the | ||
29 | # format ip:port, or name:port. If a port is not specified then 8649 | ||
30 | # (the default gmond port) is assumed. | ||
31 | # default: There is no default value | ||
32 | # | ||
33 | # data_source "my cluster" 10 localhost my.machine.edu:8649 1.2.3.5:8655 | ||
34 | # data_source "my grid" 50 1.3.4.7:8655 grid.org:8651 grid-backup.org:8651 | ||
35 | # data_source "another source" 1.3.4.7:8655 1.3.4.8 | ||
36 | |||
37 | data_source "my cluster" localhost | ||
38 | |||
39 | # | ||
40 | # Round-Robin Archives | ||
41 | # You can specify custom Round-Robin archives here (defaults are listed below) | ||
42 | # | ||
43 | # RRAs "RRA:AVERAGE:0.5:1:244" "RRA:AVERAGE:0.5:24:244" "RRA:AVERAGE:0.5:168:244" "RRA:AVERAGE:0.5:672:244" \ | ||
44 | # "RRA:AVERAGE:0.5:5760:374" | ||
45 | # | ||
46 | |||
47 | # | ||
48 | #------------------------------------------------------------------------------- | ||
49 | # Scalability mode. If on, we summarize over downstream grids, and respect | ||
50 | # authority tags. If off, we take on 2.5.0-era behavior: we do not wrap our output | ||
51 | # in <GRID></GRID> tags, we ignore all <GRID> tags we see, and always assume | ||
52 | # we are the "authority" on data source feeds. This approach does not scale to | ||
53 | # large groups of clusters, but is provided for backwards compatibility. | ||
54 | # default: on | ||
55 | # scalable off | ||
56 | # | ||
57 | #------------------------------------------------------------------------------- | ||
58 | # The name of this Grid. All the data sources above will be wrapped in a GRID | ||
59 | # tag with this name. | ||
60 | # default: unspecified | ||
61 | # gridname "MyGrid" | ||
62 | # | ||
63 | #------------------------------------------------------------------------------- | ||
64 | # The authority URL for this grid. Used by other gmetads to locate graphs | ||
65 | # for our data sources. Generally points to a ganglia/ | ||
66 | # website on this machine. | ||
67 | # default: "http://hostname/ganglia/", | ||
68 | # where hostname is the name of this machine, as defined by gethostname(). | ||
69 | # authority "http://mycluster.org/newprefix/" | ||
70 | # | ||
71 | #------------------------------------------------------------------------------- | ||
72 | # List of machines this gmetad will share XML with. Localhost | ||
73 | # is always trusted. | ||
74 | # default: There is no default value | ||
75 | # trusted_hosts 127.0.0.1 169.229.50.165 my.gmetad.org | ||
76 | # | ||
77 | #------------------------------------------------------------------------------- | ||
78 | # If you want any host which connects to the gmetad XML to receive | ||
79 | # data, then set this value to "on" | ||
80 | # default: off | ||
81 | # all_trusted on | ||
82 | # | ||
83 | #------------------------------------------------------------------------------- | ||
84 | # If you don't want gmetad to setuid then set this to off | ||
85 | # default: on | ||
86 | # setuid off | ||
87 | # | ||
88 | #------------------------------------------------------------------------------- | ||
89 | # User gmetad will setuid to (defaults to "nobody") | ||
90 | # default: "nobody" | ||
91 | # setuid_username "nobody" | ||
92 | # | ||
93 | #------------------------------------------------------------------------------- | ||
94 | # The port gmetad will answer requests for XML | ||
95 | # default: 8651 | ||
96 | # xml_port 8651 | ||
97 | # | ||
98 | #------------------------------------------------------------------------------- | ||
99 | # The port gmetad will answer queries for XML. This facility allows | ||
100 | # simple subtree and summation views of the XML tree. | ||
101 | # default: 8652 | ||
102 | # interactive_port 8652 | ||
103 | # | ||
104 | #------------------------------------------------------------------------------- | ||
105 | # The number of threads answering XML requests | ||
106 | # default: 4 | ||
107 | # server_threads 10 | ||
108 | # | ||
109 | #------------------------------------------------------------------------------- | ||
110 | # Where gmetad stores its round-robin databases | ||
111 | # default: "/var/lib/ganglia/rrds" | ||
112 | # rrd_rootdir "/some/other/place" | ||
113 | # | ||
114 | #------------------------------------------------------------------------------- | ||
115 | # In earlier versions of gmetad, hostnames were handled in a case | ||
116 | # sensitive manner | ||
117 | # If your hostname directories have been renamed to lower case, | ||
118 | # set this option to 0 to disable backward compatibility. | ||
119 | # From version 3.2, backwards compatibility will be disabled by default. | ||
120 | # default: 1 (for gmetad < 3.2) | ||
121 | # default: 0 (for gmetad >= 3.2) | ||
122 | case_sensitive_hostnames 1 | ||
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia/gmetad.init b/meta-linaro/recipes-extra/ganglia/ganglia/gmetad.init new file mode 100755 index 0000000..822f59c --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia/gmetad.init | |||
@@ -0,0 +1,48 @@ | |||
1 | #! /bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: gmetad | ||
4 | # Required-Start: $local_fs | ||
5 | # Should-Start: | ||
6 | # Required-Stop: $local_fs | ||
7 | # Should-Stop: | ||
8 | # Default-Start: 2 3 4 5 | ||
9 | # Default-Stop: 0 1 6 | ||
10 | # Short-Description: gmetad initscript | ||
11 | # Description: Starts the gmetad monitoring daemon | ||
12 | ### END INIT INFO | ||
13 | |||
14 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
15 | |||
16 | DESC="Ganglia Monitor Meta-Daemon" | ||
17 | NAME="gmetad" | ||
18 | GMETAD=`which $NAME` | ||
19 | |||
20 | . /etc/init.d/functions || exit 1 | ||
21 | |||
22 | # Exit if the package is not installed | ||
23 | [ -x "$GMETAD" ] || exit 0 | ||
24 | |||
25 | case "$1" in | ||
26 | start) | ||
27 | echo -n "Starting $DESC: $NAME... " | ||
28 | start-stop-daemon -S -x $GMETAD -- $GMETAD_ARGS | ||
29 | echo "done." | ||
30 | ;; | ||
31 | stop) | ||
32 | echo -n "Stopping $DESC: $NAME... " | ||
33 | start-stop-daemon -K -x $GMETAD | ||
34 | echo "done." | ||
35 | ;; | ||
36 | restart) | ||
37 | echo "Restarting $DESC: $NAME... " | ||
38 | $0 stop | ||
39 | $0 start | ||
40 | echo "done." | ||
41 | ;; | ||
42 | *) | ||
43 | echo "Usage: $0 {start|stop|restart}" | ||
44 | exit 1 | ||
45 | ;; | ||
46 | esac | ||
47 | |||
48 | exit 0 | ||
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia/gmond-example.conf b/meta-linaro/recipes-extra/ganglia/ganglia/gmond-example.conf new file mode 100644 index 0000000..a94b4b5 --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia/gmond-example.conf | |||
@@ -0,0 +1,383 @@ | |||
1 | /* This configuration is as close to 2.5.x default behavior as possible | ||
2 | The values closely match ./gmond/metric.h definitions in 2.5.x */ | ||
3 | globals { | ||
4 | daemonize = yes | ||
5 | setuid = yes | ||
6 | user = nobody | ||
7 | debug_level = 0 | ||
8 | max_udp_msg_len = 1472 | ||
9 | mute = no | ||
10 | deaf = yes | ||
11 | allow_extra_data = yes | ||
12 | host_dmax = 86400 /*secs. Expires (removes from web interface) hosts in 1 day */ | ||
13 | host_tmax = 20 /*secs */ | ||
14 | cleanup_threshold = 300 /*secs */ | ||
15 | gexec = no | ||
16 | # By default gmond will use reverse DNS resolution when displaying your hostname | ||
17 | # Uncommeting following value will override that value. | ||
18 | # override_hostname = "mywebserver.domain.com" | ||
19 | # If you are not using multicast this value should be set to something other than 0. | ||
20 | # Otherwise if you restart aggregator gmond you will get empty graphs. 60 seconds is reasonable | ||
21 | send_metadata_interval = 20 /*secs */ | ||
22 | |||
23 | } | ||
24 | |||
25 | /* | ||
26 | * The cluster attributes specified will be used as part of the <CLUSTER> | ||
27 | * tag that will wrap all hosts collected by this instance. | ||
28 | */ | ||
29 | cluster { | ||
30 | name = "unspecified" | ||
31 | owner = "unspecified" | ||
32 | latlong = "unspecified" | ||
33 | url = "unspecified" | ||
34 | } | ||
35 | |||
36 | /* The host section describes attributes of the host, like the location */ | ||
37 | host { | ||
38 | location = "unspecified" | ||
39 | } | ||
40 | |||
41 | /* Feel free to specify as many udp_send_channels as you like. Gmond | ||
42 | used to only support having a single channel */ | ||
43 | udp_send_channel { | ||
44 | #bind_hostname = yes # Highly recommended, soon to be default. | ||
45 | # This option tells gmond to use a source address | ||
46 | # that resolves to the machine's hostname. Without | ||
47 | # this, the metrics may appear to come from any | ||
48 | # interface and the DNS names associated with | ||
49 | # those IPs will be used to create the RRDs. | ||
50 | mcast_join = 239.2.11.71 | ||
51 | port = 8649 | ||
52 | ttl = 1 | ||
53 | } | ||
54 | |||
55 | /* You can specify as many udp_recv_channels as you like as well. */ | ||
56 | udp_recv_channel { | ||
57 | mcast_join = 239.2.11.71 | ||
58 | port = 8649 | ||
59 | bind = 239.2.11.71 | ||
60 | retry_bind = true | ||
61 | # Size of the UDP buffer. If you are handling lots of metrics you really | ||
62 | # should bump it up to e.g. 10MB or even higher. | ||
63 | # buffer = 10485760 | ||
64 | } | ||
65 | |||
66 | /* You can specify as many tcp_accept_channels as you like to share | ||
67 | an xml description of the state of the cluster */ | ||
68 | tcp_accept_channel { | ||
69 | port = 8649 | ||
70 | # If you want to gzip XML output | ||
71 | gzip_output = no | ||
72 | } | ||
73 | |||
74 | /* Channel to receive sFlow datagrams */ | ||
75 | #udp_recv_channel { | ||
76 | # port = 6343 | ||
77 | #} | ||
78 | |||
79 | /* Optional sFlow settings */ | ||
80 | #sflow { | ||
81 | # udp_port = 6343 | ||
82 | # accept_vm_metrics = yes | ||
83 | # accept_jvm_metrics = yes | ||
84 | # multiple_jvm_instances = no | ||
85 | # accept_http_metrics = yes | ||
86 | # multiple_http_instances = no | ||
87 | # accept_memcache_metrics = yes | ||
88 | # multiple_memcache_instances = no | ||
89 | #} | ||
90 | |||
91 | /* Each metrics module that is referenced by gmond must be specified and | ||
92 | loaded. If the module has been statically linked with gmond, it does | ||
93 | not require a load path. However all dynamically loadable modules must | ||
94 | include a load path. */ | ||
95 | modules { | ||
96 | module { | ||
97 | name = "core_metrics" | ||
98 | } | ||
99 | module { | ||
100 | name = "cpu_module" | ||
101 | path = "modcpu.so" | ||
102 | } | ||
103 | module { | ||
104 | name = "disk_module" | ||
105 | path = "moddisk.so" | ||
106 | } | ||
107 | module { | ||
108 | name = "load_module" | ||
109 | path = "modload.so" | ||
110 | } | ||
111 | module { | ||
112 | name = "mem_module" | ||
113 | path = "modmem.so" | ||
114 | } | ||
115 | module { | ||
116 | name = "net_module" | ||
117 | path = "modnet.so" | ||
118 | } | ||
119 | module { | ||
120 | name = "proc_module" | ||
121 | path = "modproc.so" | ||
122 | } | ||
123 | module { | ||
124 | name = "sys_module" | ||
125 | path = "modsys.so" | ||
126 | } | ||
127 | } | ||
128 | |||
129 | /* The old internal 2.5.x metric array has been replaced by the following | ||
130 | collection_group directives. What follows is the default behavior for | ||
131 | collecting and sending metrics that is as close to 2.5.x behavior as | ||
132 | possible. */ | ||
133 | |||
134 | /* This collection group will cause a heartbeat (or beacon) to be sent every | ||
135 | 20 seconds. In the heartbeat is the GMOND_STARTED data which expresses | ||
136 | the age of the running gmond. */ | ||
137 | collection_group { | ||
138 | collect_once = yes | ||
139 | time_threshold = 20 | ||
140 | metric { | ||
141 | name = "heartbeat" | ||
142 | } | ||
143 | } | ||
144 | |||
145 | /* This collection group will send general info about this host every | ||
146 | 1200 secs. | ||
147 | This information doesn't change between reboots and is only collected | ||
148 | once. */ | ||
149 | collection_group { | ||
150 | collect_once = yes | ||
151 | time_threshold = 1200 | ||
152 | metric { | ||
153 | name = "cpu_num" | ||
154 | title = "CPU Count" | ||
155 | } | ||
156 | metric { | ||
157 | name = "cpu_speed" | ||
158 | title = "CPU Speed" | ||
159 | } | ||
160 | metric { | ||
161 | name = "mem_total" | ||
162 | title = "Memory Total" | ||
163 | } | ||
164 | /* Should this be here? Swap can be added/removed between reboots. */ | ||
165 | metric { | ||
166 | name = "swap_total" | ||
167 | title = "Swap Space Total" | ||
168 | } | ||
169 | metric { | ||
170 | name = "boottime" | ||
171 | title = "Last Boot Time" | ||
172 | } | ||
173 | metric { | ||
174 | name = "machine_type" | ||
175 | title = "Machine Type" | ||
176 | } | ||
177 | metric { | ||
178 | name = "os_name" | ||
179 | title = "Operating System" | ||
180 | } | ||
181 | metric { | ||
182 | name = "os_release" | ||
183 | title = "Operating System Release" | ||
184 | } | ||
185 | metric { | ||
186 | name = "location" | ||
187 | title = "Location" | ||
188 | } | ||
189 | } | ||
190 | |||
191 | /* This collection group will send the status of gexecd for this host | ||
192 | every 300 secs.*/ | ||
193 | /* Unlike 2.5.x the default behavior is to report gexecd OFF. */ | ||
194 | collection_group { | ||
195 | collect_once = yes | ||
196 | time_threshold = 300 | ||
197 | metric { | ||
198 | name = "gexec" | ||
199 | title = "Gexec Status" | ||
200 | } | ||
201 | } | ||
202 | |||
203 | /* This collection group will collect the CPU status info every 20 secs. | ||
204 | The time threshold is set to 90 seconds. In honesty, this | ||
205 | time_threshold could be set significantly higher to reduce | ||
206 | unneccessary network chatter. */ | ||
207 | collection_group { | ||
208 | collect_every = 20 | ||
209 | time_threshold = 90 | ||
210 | /* CPU status */ | ||
211 | metric { | ||
212 | name = "cpu_user" | ||
213 | value_threshold = "1.0" | ||
214 | title = "CPU User" | ||
215 | } | ||
216 | metric { | ||
217 | name = "cpu_system" | ||
218 | value_threshold = "1.0" | ||
219 | title = "CPU System" | ||
220 | } | ||
221 | metric { | ||
222 | name = "cpu_idle" | ||
223 | value_threshold = "5.0" | ||
224 | title = "CPU Idle" | ||
225 | } | ||
226 | metric { | ||
227 | name = "cpu_nice" | ||
228 | value_threshold = "1.0" | ||
229 | title = "CPU Nice" | ||
230 | } | ||
231 | metric { | ||
232 | name = "cpu_aidle" | ||
233 | value_threshold = "5.0" | ||
234 | title = "CPU aidle" | ||
235 | } | ||
236 | metric { | ||
237 | name = "cpu_wio" | ||
238 | value_threshold = "1.0" | ||
239 | title = "CPU wio" | ||
240 | } | ||
241 | metric { | ||
242 | name = "cpu_steal" | ||
243 | value_threshold = "1.0" | ||
244 | title = "CPU steal" | ||
245 | } | ||
246 | /* The next two metrics are optional if you want more detail... | ||
247 | ... since they are accounted for in cpu_system. | ||
248 | metric { | ||
249 | name = "cpu_intr" | ||
250 | value_threshold = "1.0" | ||
251 | title = "CPU intr" | ||
252 | } | ||
253 | metric { | ||
254 | name = "cpu_sintr" | ||
255 | value_threshold = "1.0" | ||
256 | title = "CPU sintr" | ||
257 | } | ||
258 | */ | ||
259 | } | ||
260 | |||
261 | collection_group { | ||
262 | collect_every = 20 | ||
263 | time_threshold = 90 | ||
264 | /* Load Averages */ | ||
265 | metric { | ||
266 | name = "load_one" | ||
267 | value_threshold = "1.0" | ||
268 | title = "One Minute Load Average" | ||
269 | } | ||
270 | metric { | ||
271 | name = "load_five" | ||
272 | value_threshold = "1.0" | ||
273 | title = "Five Minute Load Average" | ||
274 | } | ||
275 | metric { | ||
276 | name = "load_fifteen" | ||
277 | value_threshold = "1.0" | ||
278 | title = "Fifteen Minute Load Average" | ||
279 | } | ||
280 | } | ||
281 | |||
282 | /* This group collects the number of running and total processes */ | ||
283 | collection_group { | ||
284 | collect_every = 80 | ||
285 | time_threshold = 950 | ||
286 | metric { | ||
287 | name = "proc_run" | ||
288 | value_threshold = "1.0" | ||
289 | title = "Total Running Processes" | ||
290 | } | ||
291 | metric { | ||
292 | name = "proc_total" | ||
293 | value_threshold = "1.0" | ||
294 | title = "Total Processes" | ||
295 | } | ||
296 | } | ||
297 | |||
298 | /* This collection group grabs the volatile memory metrics every 40 secs and | ||
299 | sends them at least every 180 secs. This time_threshold can be increased | ||
300 | significantly to reduce unneeded network traffic. */ | ||
301 | collection_group { | ||
302 | collect_every = 40 | ||
303 | time_threshold = 180 | ||
304 | metric { | ||
305 | name = "mem_free" | ||
306 | value_threshold = "1024.0" | ||
307 | title = "Free Memory" | ||
308 | } | ||
309 | metric { | ||
310 | name = "mem_shared" | ||
311 | value_threshold = "1024.0" | ||
312 | title = "Shared Memory" | ||
313 | } | ||
314 | metric { | ||
315 | name = "mem_buffers" | ||
316 | value_threshold = "1024.0" | ||
317 | title = "Memory Buffers" | ||
318 | } | ||
319 | metric { | ||
320 | name = "mem_cached" | ||
321 | value_threshold = "1024.0" | ||
322 | title = "Cached Memory" | ||
323 | } | ||
324 | metric { | ||
325 | name = "swap_free" | ||
326 | value_threshold = "1024.0" | ||
327 | title = "Free Swap Space" | ||
328 | } | ||
329 | } | ||
330 | |||
331 | collection_group { | ||
332 | collect_every = 40 | ||
333 | time_threshold = 300 | ||
334 | metric { | ||
335 | name = "bytes_out" | ||
336 | value_threshold = 4096 | ||
337 | title = "Bytes Sent" | ||
338 | } | ||
339 | metric { | ||
340 | name = "bytes_in" | ||
341 | value_threshold = 4096 | ||
342 | title = "Bytes Received" | ||
343 | } | ||
344 | metric { | ||
345 | name = "pkts_in" | ||
346 | value_threshold = 256 | ||
347 | title = "Packets Received" | ||
348 | } | ||
349 | metric { | ||
350 | name = "pkts_out" | ||
351 | value_threshold = 256 | ||
352 | title = "Packets Sent" | ||
353 | } | ||
354 | } | ||
355 | |||
356 | /* Different than 2.5.x default since the old config made no sense */ | ||
357 | collection_group { | ||
358 | collect_every = 1800 | ||
359 | time_threshold = 3600 | ||
360 | metric { | ||
361 | name = "disk_total" | ||
362 | value_threshold = 1.0 | ||
363 | title = "Total Disk Space" | ||
364 | } | ||
365 | } | ||
366 | |||
367 | collection_group { | ||
368 | collect_every = 40 | ||
369 | time_threshold = 180 | ||
370 | metric { | ||
371 | name = "disk_free" | ||
372 | value_threshold = 1.0 | ||
373 | title = "Disk Space Available" | ||
374 | } | ||
375 | metric { | ||
376 | name = "part_max_used" | ||
377 | value_threshold = 1.0 | ||
378 | title = "Maximum Disk Space Used" | ||
379 | } | ||
380 | } | ||
381 | |||
382 | include ("/etc/conf.d/*.conf") | ||
383 | |||
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia/gmond.init b/meta-linaro/recipes-extra/ganglia/ganglia/gmond.init new file mode 100755 index 0000000..4509329 --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia/gmond.init | |||
@@ -0,0 +1,46 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: gmond | ||
4 | # Required-Start: $local_fs | ||
5 | # Required-Stop: $local_fs | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 0 1 6 | ||
8 | # Short-Description: Starts ganglia monitor | ||
9 | # Description: Starts the gmond monitoring daemon | ||
10 | ### END INIT INFO | ||
11 | |||
12 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
13 | |||
14 | DESC="Ganglia Monitor Daemon" | ||
15 | NAME="gmond" | ||
16 | GMOND=`which $NAME` | ||
17 | |||
18 | . /etc/init.d/functions || exit 1 | ||
19 | |||
20 | # Exit if the package is not installed | ||
21 | [ -x "$GMOND" ] || exit 0 | ||
22 | |||
23 | case "$1" in | ||
24 | start) | ||
25 | echo -n "Starting $DESC: $NAME... " | ||
26 | start-stop-daemon -S -x $GMOND -- $GMOND_ARGS | ||
27 | echo "done." | ||
28 | ;; | ||
29 | stop) | ||
30 | echo -n "Stopping $DESC: $NAME... " | ||
31 | start-stop-daemon -K -x $GMOND | ||
32 | echo "done." | ||
33 | ;; | ||
34 | restart) | ||
35 | echo "Restarting $DESC: $NAME... " | ||
36 | $0 stop | ||
37 | $0 start | ||
38 | echo "done." | ||
39 | ;; | ||
40 | *) | ||
41 | echo "Usage: $0 {start|stop|restart}" | ||
42 | exit 1 | ||
43 | ;; | ||
44 | esac | ||
45 | |||
46 | exit 0 | ||
diff --git a/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb b/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb new file mode 100644 index 0000000..7bed70d --- /dev/null +++ b/meta-linaro/recipes-extra/ganglia/ganglia_3.6.0.bb | |||
@@ -0,0 +1,70 @@ | |||
1 | DESCRIPTION = "Ganglia is a scalable distributed monitoring \ | ||
2 | system for high-performance computing systems such as \ | ||
3 | clusters and Grids." | ||
4 | HOMEPAGE = "http://ganglia.sourceforge.net/" | ||
5 | SECTION = "console/utils" | ||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://NEWS;md5=ff8c91481123c7d3be4e31fcac997747" | ||
8 | DEPENDS = "apr confuse pcre python rrdtool" | ||
9 | |||
10 | SRC_URI = "\ | ||
11 | ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ | ||
12 | file://gmetad-example.conf \ | ||
13 | file://gmetad.init \ | ||
14 | file://gmond-example.conf \ | ||
15 | file://gmond.init \ | ||
16 | " | ||
17 | SRC_URI[md5sum] = "05926bb18c22af508a3718a90b2e9a2c" | ||
18 | SRC_URI[sha256sum] = "89eae02e1a117040d60b3b561fe55f88d7f8cf41b94af1492969ef68e6797886" | ||
19 | |||
20 | EXTRA_OECONF += " \ | ||
21 | --with-gmetad \ | ||
22 | --disable-python \ | ||
23 | " | ||
24 | |||
25 | inherit pkgconfig autotools-brokensep pythonnative update-rc.d | ||
26 | |||
27 | # The ganglia autoconf setup doesn't include libmetrics in its | ||
28 | # AC_OUTPUT list -- it reconfigures libmetrics using its own rules. | ||
29 | # Unfortunately this means an OE autoreconf will not regenerate | ||
30 | # ltmain.sh (and others) in libmetrics and as such the build will | ||
31 | # fail. We explicitly force regeneration of that directory. | ||
32 | |||
33 | do_configure_append() { | ||
34 | (cd ${S} ; autoreconf -fvi ) | ||
35 | (cd ${S}/libmetrics ; autoreconf -fvi) | ||
36 | } | ||
37 | |||
38 | do_install_append() { | ||
39 | install -d ${D}${sysconfdir}/init.d | ||
40 | # gmetad expects the following directory and owned by user 'nobody' | ||
41 | install -o nobody -d ${D}${localstatedir}/lib/${PN}/rrds | ||
42 | # gmond and gmetad configurations | ||
43 | install -m 0644 ${WORKDIR}/gmetad-example.conf ${D}${sysconfdir}/gmetad.conf | ||
44 | install -m 0644 ${WORKDIR}/gmond-example.conf ${D}${sysconfdir}/gmond.conf | ||
45 | # Init scripts | ||
46 | install -m 0755 ${WORKDIR}/gmetad.init ${D}${sysconfdir}/init.d/gmetad | ||
47 | install -m 0755 ${WORKDIR}/gmond.init ${D}${sysconfdir}/init.d/gmond | ||
48 | # Fixup hard-coded paths | ||
49 | sed -i -e 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/gmetad | ||
50 | sed -i -e 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/gmond | ||
51 | sed -i -e 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/gmetad | ||
52 | sed -i -e 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/gmond | ||
53 | sed -i -e 's!/etc/conf.d/!${sysconfdir}/conf.d/!g' ${D}${sysconfdir}/gmond.conf | ||
54 | } | ||
55 | |||
56 | PACKAGES =+ "gmetad" | ||
57 | |||
58 | RDEPENDS_${PN} = "gmetad" | ||
59 | |||
60 | BBCLASSEXTEND = "native" | ||
61 | |||
62 | FILES_gmetad = "\ | ||
63 | ${sbindir}/gmetad \ | ||
64 | ${sysconfdir}/init.d/gmetad \ | ||
65 | " | ||
66 | |||
67 | INITSCRIPT_PACKAGES = "${PN} gmetad" | ||
68 | INITSCRIPT_NAME_ganglia = "gmond" | ||
69 | INITSCRIPT_NAME_gmetad = "gmetad" | ||
70 | INITSCRIPT_PARAMS = "defaults 66" | ||