td-agent 1.1.17
ログ生成
https://github.com/sonots/dummy_log_generator を使用し、-r 100000 や -r 200000 と指定。実際に20万lines/sec吐き出せていることはもちろん確認済み。
送信側
global screenWidth | |
global screenHeight | |
tell (do shell script "/usr/sbin/system_profiler SPDisplaysDataType | grep Resolution | tail -n 1") to set {screenWidth, screenHeight} to {word 2 as number, word 4 as number} | |
-- display dialog "screen: " & screenWidth & "x" & screenHeight | |
if screenWidth = 1200 then | |
-- display dialog "monitor U2410" | |
tell application "System Events" |
my $spf_server = Mail::SPF::Server->new; | |
my $request = Mail::SPF::Request->new( | |
versions => [1,2], | |
scope => 'mfrom', | |
identity => $self->from, | |
ip_address => $ip, | |
); | |
my $result = $spf_server->process($request); | |
$result->is_code('pass'); |
#!/bin/sh | |
SEC=$1 | |
tcpdump -s 65535 -nn -q -tttt -x port 3306 -l > /tmp/tcpdump.3306 2> /dev/null & | |
PID_3306=$! | |
tcpdump -s 65535 -nn -q -tttt -x port 11211 -l > /tmp/tcpdump.11211 2> /dev/null & | |
PID_11211=$! |
http { | |
map $uri $backend_port { | |
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; | |
server { |
> perl -E 'say "生" & "死"' | |
愛 | |
生 Life U+751F \xe7\x94\x9f 11100111 10010100 10011111 | |
死 Death U+6B7B \xe6\xad\xbb 11100110 10101101 10111011 | |
愛 Love u+611B \xe6\x84\x9b 11100110 10000100 10011011 |
package Apache::BumpyLife; | |
use strict; | |
use warnings; | |
use Config; | |
use Apache::Constants (); | |
use constant IS_WIN32 => $Config{'osname'} eq 'MSWin32' ? 1 : 0; | |
our $VERSION = '0.01'; |
$ perl installed2cpanfile > cpanfile | |
$ cpanm --installdeps . |
#! /usr/bin/perl | |
use POSIX qw(setuid setgid); | |
use Unix::Groups qw(setgroups); | |
die "usage: setusergroups username child\n" | |
unless @ARGV >= 2; | |
my $username = shift @ARGV; | |
# get user entry |
td-agent 1.1.17
ログ生成
https://github.com/sonots/dummy_log_generator を使用し、-r 100000 や -r 200000 と指定。実際に20万lines/sec吐き出せていることはもちろん確認済み。
送信側
function formatN (n) { | |
const unitList = ['y', 'z', 'a', 'f', 'p', 'n', 'u', 'm', '', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']; | |
const zeroIndex = 8; | |
const nn = n.toExponential(2).split(/e/); | |
let u = Math.floor(+nn[1] / 3) + zeroIndex; | |
if (u > unitList.length - 1) { | |
u = unitList.length - 1; | |
} else | |
if (u < 0) { | |
u = 0; |