This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jasonc@trask:~$ ruby libxml_sax.rb | |
Thread ID: 70237214132660 | |
Total Time: 0.14 | |
%total %self total self wait child calls Name | |
-------------------------------------------------------------------------------- | |
100.00% 0.00% 0.14 0.00 0.00 0.14 1 Global#[No method] (libxml_sax.rb:64} libxml_sax.rb:64 | |
0.14 0.11 0.00 0.03 1/1 LibXML::XML::SaxParser#parse | |
0.00 0.00 0.00 0.00 1/2 Class#new | |
0.00 0.00 0.00 0.00 1/1 <Class::LibXML::XML::SaxParser>#file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'xml/libxml' | |
Gmeta | |
include XML::SaxParser::Callbacks | |
def initialize | |
@ganglia = {} | |
@grid = nil | |
@cluster = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Net::Stomp; | |
use Data::Dumper; | |
while(1) { | |
eval { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ganglia_interface(host) | |
if host[:ganglia] && host[:ganglia][:cluster] && host[:ganglia][:cluster][:interface] | |
interface = host[:ganglia_cluster][:interface] | |
else | |
interface = host[:network][:default_interface] | |
end | |
end | |
def ganglia_ip(host) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Mon, 26 Oct 2009 21:57:11 +0000] INFO: Starting Chef Run | |
[Mon, 26 Oct 2009 21:57:11 +0000] DEBUG: Loading plugin os | |
[Mon, 26 Oct 2009 21:57:11 +0000] DEBUG: Loading plugin ruby | |
[Mon, 26 Oct 2009 21:57:11 +0000] DEBUG: Loading plugin languages | |
[Mon, 26 Oct 2009 21:57:11 +0000] DEBUG: Loading plugin kernel | |
[Mon, 26 Oct 2009 21:57:11 +0000] DEBUG: ---- Begin uname -s STDOUT ---- | |
[Mon, 26 Oct 2009 21:57:11 +0000] DEBUG: Linux | |
[Mon, 26 Oct 2009 21:57:11 +0000] DEBUG: ---- End uname -s STDOUT ---- | |
[Mon, 26 Oct 2009 21:57:11 +0000] DEBUG: ---- Begin uname -s STDERR ---- | |
[Mon, 26 Oct 2009 21:57:11 +0000] DEBUG: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Wed, 07 Oct 2009 17:52:06 +0000] ERROR: service[openntpd] (/var/chef/cache/cookbooks/ntp/recipes/default.rb line 28) had an error: | |
closed stream | |
/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/provider/service/simple.rb:60:in `close'/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/provider/service/simple.rb:60:in `load_current_resource'/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/mixin/command.rb:371:in `[]'/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/mixin/command.rb:371:in `popen4'/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/provider/service/simple.rb:59:in `load_current_resource'/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/provider/service/debian.rb:28:in `load_current_resource'/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/runner.rb:55:in `build_provider'/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/runner.rb:60:in `run_action'/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/runner.rb:111:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.7.12/lib/chef/runner.rb:110:in `each'/usr/lib/r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use threads; | |
my $minthreads = 5; | |
my $maxthreads = 50; | |
my $queue_size = 1001; | |
my @workers; | |
my @zombies; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/us/bin/perl | |
use warnings; | |
use strict; | |
use Working::Daemon; | |
use IO::Socket; | |
use JSON::DWIW; | |
use LWP::UserAgent; | |
use threads; | |
use threads::shared; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init_workers(); | |
while(1) { | |
if ($apache_load > 100 ) { | |
remove_worker(); | |
} elsif ( $queue_size > 10000 ) { | |
add_worker(); | |
} | |
sleep 5; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use Working::Daemon; | |
use IO::Socket; | |
use threads; | |
use threads::shared; | |
use Data::Dumper; |