Skip to content

Instantly share code, notes, and snippets.

@flores
Created October 18, 2010 17:17
Show Gist options
  • Save flores/632613 to your computer and use it in GitHub Desktop.
Save flores/632613 to your computer and use it in GitHub Desktop.
just a ruby wrapper to a haproxy socket
#!/usr/bin/ruby -w
require 'socket'
ctl=UNIXSocket.new("/tmp/proxystats")
ctl.puts "#{ARGV}"
while (line = ctl.gets) do
puts line
end
ctl.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment