150 likes | 302 Views
Modifying Ganglia. Brad Israel bdi8241@rit.edu. 10/16/08. Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu. 1. Basics. Add metrics by creating modules for gmond Newer versions of Ganglia support Python modules
E N D
Modifying Ganglia Brad Israel bdi8241@rit.edu 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 1
Basics • Add metrics by creating modules for gmond • Newer versions of Ganglia support Python modules • Modules are distributed to Ganglia system folder (/usr/lib64/ganglia/ • Administrators modify /etc/ganglia/gmond.conf to load and add the modules • Web interface takes care of default graphs • Create a new theme that has better performance graphs • Modify interface conf.php file to use new theme, customize colors 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 2
Benchmark Metric Single Precision Linpack (singlelinpack.py): def benchmark_handler(name): global path output = Popen([path + "linpack_bench_s"], stdout=PIPE).communicate()[0] line = output.split() return float(line[47]) 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 3
Benchmark Metric Single Precision Linpack (singlelinpack.py): def metric_init(params): global descriptors global path if 'path' in params: path = params['path'] else: path = "./" 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 4
Benchmark Metric Single Precision Linpack (singlelinpack.py): d1 = {'name': 'singlelinpack', 'call_back': benchmark_handler, 'time_max': 1200, 'value_type': 'float', 'units': 'Mflops/s', 'slope': 'both', 'format': '%f', 'description': 'Performance of host using Single Precision Linpack', 'groups': 'performance'} descriptors = [d1] return descriptors 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 5
Benchmark Metric Single Precision Linpack (singlelinpack.py): def metric_cleanup(): '''Clean up the metric module.''' pass 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 6
Benchmark Metric Default Metric Graph for Benchmark: 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 7
Benchmark Metric All Default Benchmark Graphs: 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 8
Benchmark Graphs frontend/graph.d/performance_report.php: function graph_performance_report ( &$rrdtool_graph ) { global $context, $hostname, $javalinpack_color, $singlelinpack_color, $doublelinpack_color, $avg_performance_color, $total_performance_color, $range, $rrd_dir, $size; 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 9
Benchmark Graphs frontend/graph.d/performance_report.php: $title = 'Performance'; if ($context != 'host') { $rrdtool_graph['title'] = $title; } else { $rrdtool_graph['title'] = "$hostname $title last $range"; } $rrdtool_graph['lower-limit'] = '0'; $rrdtool_graph['vertical-label'] = 'Mflops/s'; $rrdtool_graph['extras'] = '--rigid --base 1024'; 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 10
Benchmark Graphs frontend/graph.d/performance_report.php: $series = "DEF:'jlp'='${rrd_dir}/javalinpack.rrd':'sum':AVERAGE " ."DEF:'slp'='${rrd_dir}/singlelinpack.rrd':'sum':AVERAGE " ."DEF:'dlp'='${rrd_dir}/doublelinpack.rrd':'sum':AVERAGE " ."CDEF:'avgp'=slp,dlp,+,jlp,+,3,/ " ."AREA:'slp'#$doublelinpack_color:'Double Mflops/s' " ."AREA:'dlp'#$singlelinpack_color:'Single Mflops/s' " ."AREA:'jlp'#$javalinpack_color:'Java Mflops/s' " ."LINE:'avgp'#$avg_performance_color:'Avgerage Mflops/s' "; $rrdtool_graph['series'] = $series; return $rrdtool_graph; 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 11
Benchmark Graphs Host Overview: 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 12
Benchmark Graphs Cluster Overview: 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 13
Benchmark Graphs Cluster Overview: 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 14
References • http://ganglia.info/ • http://ganglia.wiki.sourceforge.net/ • http://ganglia.svn.sourceforge.net/viewvc/ganglia/branches/monitor-core-3.1/gmond/modules/python/README.in?view=markup • http://oss.oetiker.ch/rrdtool/ • http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html • http://www.netlib.org/benchmark/linpackjava/ • http://www.netlib.org/benchmark/ 10/16/08 Service Oriented Cyberinfrastructure Lab, http://grid.rit.edu 15