Skip to content

Instantly share code, notes, and snippets.

View lazzarello's full-sized avatar

Lee Azzarello lazzarello

View GitHub Profile
@lazzarello
lazzarello / alsa multi
Created December 16, 2010 02:44
take two 2 channel PCM streams as different hw devices and make them a single 4 channel stream
pcm.4chan {
type multi
slaves.a.pcm "hw:1,0"
slaves.a.channels 2
slaves.b.pcm "hw:1,1"
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
#!/usr/bin/ruby -w
require 'rubygems'
require 'RRD'
rrd = "/var/lib/munin/localdomain/localhost.localdomain-if_wlan0-up-c.rrd"
start = Time.now.to_i
# extract four variables with corresponding values from the rrd data
# data is some mysterious number, usually 42
# do these do the same thing?
directory "/usr/local/src/swftools-0.9.1" do
action :delete
recursive true
only_if "test -d /usr/local/src/swftools-0.9.1"
end
directory "/usr/local/src/swftools-0.9.1" do
action :delete
[2010-05-05 20:39:54] [FixedTimeJob] Child spawned! pid: 21148, job record: 17688948
warning: peer certificate won't be verified in this SSL session
DEPRECATION WARNING: require "activesupport" is deprecated and will be removed in Rails 3. Use require "active_support" instead.. (called from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/activesupport.rb:2)
/usr/lib/ruby/1.8/net/http.rb:560:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
from /usr/lib/ruby/1.8/net/http.rb:560:in `open'
from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
from /usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
from /usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
from /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
total_memory = node[:memory][:total]
memory_size = Chef::Search::Query.new.search(:ec2_enums, "id:memory_size").flatten.first
if ( total_memory.to_i <= memory_size['small'].to_i )
set[:postgresql][:shmmax] = "33554432"
set[:postgresql][:shmall] = "2097152"
set[:postgresql][:shmmni] = "4096"
set[:postgresql][:max_connections] = "25"
set[:postgresql][:shared_buffers] = "35MB"
set[:postgresql][:work_mem] = "2MB"
chef-primary:~# strace -p 1480 -c
Process 1480 attached - interrupt to quit
Process 1480 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.063530 0 363630 rt_sigprocmask
0.00 0.000000 0 270 247 read
0.00 0.000000 0 248 247 rt_sigreturn
------ ----------- ----------- --------- --------- ----------------
100.00 0.063530 364148 494 total
/var/chef/cache/cookbooks/postgresql/attributes/postgresql.rb:36:in `from_file': undefined method `[]' for :ec2_enums:Symbol (NoMethodError)
from /var/lib/gems/1.8/gems/chef-0.8.4/bin/../lib/chef/cookbook.rb:83:in `load_attribute_file'
from /var/lib/gems/1.8/gems/chef-0.8.4/bin/../lib/chef/cookbook.rb:76:in `load_attributes'
from /var/lib/gems/1.8/gems/chef-0.8.4/bin/../lib/chef/cookbook.rb:75:in `each'
from /var/lib/gems/1.8/gems/chef-0.8.4/bin/../lib/chef/cookbook.rb:75:in `load_attributes'
from /var/lib/gems/1.8/gems/chef-0.8.4/bin/../lib/chef/compile.rb:78:in `load_attributes'
from /var/lib/gems/1.8/gems/chef-0.8.4/bin/../lib/chef/cookbook_loader.rb:132:in `each'
from /var/lib/gems/1.8/gems/chef-0.8.4/bin/../lib/chef/cookbook_loader.rb:131:in `each'
from /var/lib/gems/1.8/gems/chef-0.8.4/bin/../lib/chef/compile.rb:77:in `load_attributes'
from /var/lib/gems/1.8/gems/chef-0.8.4/bin/../lib/chef/compile.rb:52:in `initialize'
search(:application, "id:release").each do |i|
if i == "tag"
release_tag = i["tag"]
break
end
end
2010-03-04_17:18:43.82608 /var/lib/gems/1.8/gems/chef-0.8.4/lib/chef/client.rb:148:in `build_node': Unable to determine node name from ohai (RuntimeError)
2010-03-04_17:18:43.82624 from /var/lib/gems/1.8/gems/chef-solr-0.8.4/lib/chef/solr/application/solr.rb:110:in `setup_application'
2010-03-04_17:18:43.82627 from /var/lib/gems/1.8/gems/chef-0.8.4/lib/chef/application.rb:56:in `run'
2010-03-04_17:18:43.82629 from /var/lib/gems/1.8/gems/chef-solr-0.8.4/bin/chef-solr:26
2010-03-04_17:18:43.82632 from /var/lib/gems/1.8/bin/chef-solr:19:in `load'
2010-03-04_17:18:43.82634 from /var/lib/gems/1.8/bin/chef-solr:19
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `ejabberd' in `../ejabberd_2.1.2-1.1_i386.deb'.
dpkg-genchanges >../ejabberd_2.1.2-1.1_i386.changes
dpkg-genchanges: failure: cannot open .dsc file ../ejabberd_2.1.2-1.1.dsc: No such file or directory
dpkg-buildpackage: failure: dpkg-genchanges gave error exit status 2
debuild: fatal error at line 1319: