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
http { | |
map $uri $backend_port { | |
hostnames; | |
include port_map; | |
} | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; |
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
$ curl -kL https://raw.github.com/riywo/App-llenv/master/llenv-install | bash | |
and add your .bashrc or something | |
export LLENV_ROOT=$HOME/llenv | |
export LLENV_OSTYPE=`$LLENV_ROOT/bin/ostype` | |
export PATH=$LLENV_ROOT/bin:$PATH | |
$ llinstall init perl | |
$ llinstall install perl perl-5.14.2 |
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
use strict; | |
use warnings; | |
use utf8; | |
package Amon2::Plugin::DBIx::Handler; | |
use DBIx::Handler; | |
sub init { | |
my ($class, $context_class, $config) = @_; |
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
{ | |
"hostname":"ga910", | |
"stats":{ | |
"cpu":{ | |
"cpu":{"user":0,"nice":0,"system":2,"idle":400,"iowait":0,"irq":0,"softirq":0,"steal":0,"guest":0}, | |
"cpu0":{"user":0,"nice":0,"system":0,"idle":100,"iowait":0,"irq":0,"softirq":0,"steal":0,"guest":0}, | |
"cpu1":{"user":0,"nice":0,"system":1,"idle":98,"iowait":0,"irq":0,"softirq":0,"steal":0,"guest":0}, | |
"cpu2":{"user":0,"nice":0,"system":1,"idle":100,"iowait":0,"irq":0,"softirq":0,"steal":0,"guest":0}, | |
"cpu3":{"user":0,"nice":0,"system":0,"idle":101,"iowait":0,"irq":0,"softirq":0,"steal":0,"guest":0} | |
}, |
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
<source> | |
type tail | |
format /^(?<test>.*)$/ | |
path /tmp/real | |
tag debug.real | |
pos_file /tmp/real_pos | |
</source> | |
<source> | |
type tail |
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
$ perl test.pl & | |
$ echo aaa >> /tmp/real | |
$ /tmp/real has changed somehow. | |
$ | |
$ echo aaa >> /tmp/symlink | |
$ /tmp/real has changed somehow. |
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
if [ -d "/etc/prelink.conf.d/" ]; then | |
echo "prelink detected. Installing /etc/prelink.conf.d/td-agent-ruby.conf ..." | |
cp -f /etc/td-agent/prelink.conf.d/td-agent.conf /etc/prelink.conf.d/td-agent-ruby.conf | |
elif [ $(grep '\-b /usr/lib{,64}/fluent/ruby/bin/ruby' -c /etc/prelink.conf) -eq 0 ]; then | |
echo "prelink detected, but /etc/prelink.conf.d/ don't exist. Adding /etc/prelink.conf..." | |
echo "-b /usr/lib{,64}/fluent/ruby/bin/ruby" >> /etc/prelink.conf | |
fi |
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
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "usage: ./make-rpm.sh 0.2" | |
exit 1 | |
fi | |
version=$1 | |
cur=`pwd` | |
rm -f fluent-agent-lite.v$version.tar.gz | |
rm -fr fluent-agent-lite |
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
#!/usr/bin/python | |
import sys | |
import yum | |
#ruby-1.8.5-24.el5.x86_64 | |
pkg1 = ('ruby', 'x86_64', 0, '1.8.5', '24.el5') | |
#ruby-1.8.5-5.el5_4.8.x86_64 | |
pkg2 = ('ruby', 'x86_64', 0, '1.8.5', '5.el5_4') | |
print yum.bestPackage(pkg1, pkg2) |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use DBIx::QueryLog::Fluent; | |
#DBIx::QueryLog::Fluent->logger( | |
# host => "127.0.0.1", | |
# port => 22422, | |
#); |