require 'snmp'
require 'benchmark'
puts "creating cache"
indexes = []
SNMP::Manager.open(host: 'localhost', community: 'public') do |manager|
manager.walk(%w(ifIndex)) { |row| indexes << row[0].value.to_i }
end
This file contains hidden or 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
こういう状態で | |
$ snmpwalk -c public -v 2c localhost:10161 ifDesc | |
IF-MIB::ifDescr.1 = STRING: lo | |
IF-MIB::ifDescr.2 = STRING: eth0 | |
IF-MIB::ifDescr.3 = STRING: eth1 | |
IF-MIB::ifDescr.4 = STRING: veth0 | |
IF-MIB::ifDescr.5 = STRING: veth1 | |
IF-MIB::ifDescr.6 = STRING: eth1.100 | |
veth0,veth0を消した |
$ homesick clone niku4i/dotfiles
git clone https://github.com/niku4i/dotfiles.git to /home/nikushi/.homesick/repos/dotfiles
error: unknown option `config'
usage: git clone [options] [--] <repo> [<dir>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--progress force progress reporting
-n, --no-checkout don't create a checkout
require 'fluent-logger'
log = Fluent::Logger::FluentLogger.new(nil, :host=>'localhost', :port=>24224)
log.post("myapp.access", {"agent"=>"foo"})
fork do
log.post("myapp.access", {"agent"=>"foo"})
end
===== TCP 3way handshake =====
GET / HTTP/1.1
Host: localhost
Connection: Keep-Alive
HTTP/1.0 200 OK
body....
$ start_server --path=/tmp/gf.sock -- growthforecast.pl --socket=/tmp/gf.sock
15:04:57 3.1 | setsockopt(TCP_NODELAY) failed:Operation not supported on socket at /Users/nikushi.nobuhiro/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1/Starlet/Server.pm line 98.
This file contains hidden or 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 'json' | |
10000.times do |i| | |
JSON.parse(open("list.json", 'r').read) | |
end |
This file contains hidden or 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
knife solo cook cheftest.local | |
Running Chef on cheftest.local... | |
Checking Chef version... | |
Installing Berkshelf cookbooks to 'cookbooks'... | |
Installing td-agent (0.0.1) from git: 'https://github.com/treasure-data/chef-td-agent.git' with branch: 'master' at ref: 'd29d3f78bc2ffe991c63d56cbf8521eda6fdeb35' | |
Using apt (2.3.4) | |
Using yum (3.0.4) | |
Uploading the kitchen... | |
Generating solo config... | |
Running Chef... |
This file contains hidden or 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
クライアントに必要なコンフィグのメモ |