Skip to content

Instantly share code, notes, and snippets.

View armaniacs's full-sized avatar

ARAKI Yasuhiro armaniacs

View GitHub Profile
$ df .
ファイルシス 1K-blocks 使用 使用可 使用% マウント位置
/dev/xvda1 8123812 916960 7106604 12% /
$ free
total used free shared buffers cached
Mem: 1020536 119212 901324 0 8792 68076
-/+ buffers/cache: 42344 978192
Swap: 0 0 0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.10.42-52.145.amzn1.x86_64 (mockbuild@gobi-build-64003) (gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) ) #1 SMP Tue Jun 10 23:46:43 UTC 2014
[ 0.000000] Command line: root=LABEL=/ console=ttyS0
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009e000-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003fffffff] usable
traceroute to 210.130.0.1 (210.130.0.1), 30 hops max, 60 byte packets
1 ip-10-164-33-129.ap-northeast-1.compute.internal (10.164.33.129) 0.972 ms 1.229 ms 1.523 ms
2 100.65.169.6 (100.65.169.6) 0.765 ms 100.65.169.4 (100.65.169.4) 0.885 ms 0.884 ms
3 100.65.169.39 (100.65.169.39) 0.736 ms 100.65.169.45 (100.65.169.45) 0.922 ms 100.65.169.42 (100.65.169.42) 0.839 ms
4 100.67.142.6 (100.67.142.6) 0.852 ms 100.67.138.5 (100.67.138.5) 0.975 ms 100.67.106.4 (100.67.106.4) 0.956 ms
5 100.67.71.186 (100.67.71.186) 1.486 ms 100.67.125.58 (100.67.125.58) 1.330 ms 100.67.140.118 (100.67.140.118) 1.373 ms
6 100.68.228.115 (100.68.228.115) 2.695 ms 100.68.231.107 (100.68.231.107) 1.182 ms 100.68.227.125 (100.68.227.125) 0.869 ms
7 100.68.224.40 (100.68.224.40) 1.829 ms 100.68.224.60 (100.68.224.60) 1.858 ms 100.68.225.210 (100.68.225.210) 0.978 ms
8 100.68.58.2 (100.68.58.2) 0.507 ms 100.68.58.34 (100.68.58.34) 0.479 ms 0.608 ms
9 100.64.28.1 (100.64.28.1) 0.594 ms 100.64.28.195
<?xml version="1.0" encoding="UTF-8" ?>
<workload name="s3-sample" description="sample benchmark for s3">
<storage type="s3" config="accesskey=************;secretkey=**********;endpoint=s3-us-west-2.amazonaws.com" />
<workflow>
<workstage name="init">
<work type="init" workers="1" config="cprefix=*****-oregon;containers=r(1,2)" />
</workstage>
@armaniacs
armaniacs / gist:8078577
Last active January 1, 2016 02:19
cosbench start-all
$ sh start-all.sh
Launching osgi framwork ...
Successfully launched osgi framework!
Booting cosbench driver ...
.
Starting cosbench-log_0.3.3.0 [OK]
Starting cosbench-tomcat_0.3.3.0 [OK]
Starting cosbench-config_0.3.3.0 [OK]
Starting cosbench-http_0.3.3.0 [OK]
Starting cosbench-core_0.3.3.0 [OK]
.
├── 3rd-party-licenses.pdf
├── BUILD.md
├── CHANGELOG
├── cli.sh
├── conf
│   ├── ampli-config-sample.xml
│   ├── controller.conf
│   ├── controller-tomcat-server.xml
│   ├── cosbench-users.xml
$ diff -u machine.json.orig machine.json
--- machine.json.orig 2013-09-05 11:27:25.000000000 +0900
+++ machine.json 2013-09-05 11:29:39.000000000 +0900
@@ -3,14 +3,14 @@
"type": "virtualbox",
"guest_os_type": "RedHat_64",
"iso_url": "http://mozilla.ftp.iij.ad.jp/pub/linux/centos/6/isos/x86_64/CentOS-6.4-x86_64-minimal.iso",
- "iso_md5": "4a5fa01c81cc300f4729136e28ebe600",
+ "iso_checksum": "4a5fa01c81cc300f4729136e28ebe600",
+ "iso_checksum_type": "md5",
@armaniacs
armaniacs / 0520b.rb
Last active December 17, 2015 12:39
This sample AWS ruby SDK uploads files in local to S3. MD5で修正検出して、Uploadします。 手元のTimestampが更新されたらUploadします。 10M超えは分割Uploadします。
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'rubygems'
require 'aws-sdk'
require 'time'
require 'digest/md5'
require 'find'
require 'dbm'
require 'mime/types'
seq-read: (g=0): rw=read, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
...
seq-read: (g=0): rw=read, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
rand-read: (g=1): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
...
rand-read: (g=1): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
seq-write: (g=2): rw=write, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
...
seq-write: (g=2): rw=write, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
randwrite: (g=3): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
@armaniacs
armaniacs / vpc-master-instance.json
Last active December 12, 2015 09:39
JAWS yokohama VPC meta
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Instance Deployment on existing vpc",
"Parameters": {
"SiteURL": {
"Type": "String",
"Default": "xxxxx.araki.in",
"Description" : "Name of a FQDN for ec-site."},
"InstanceType" : {
"Description" : "WebServer EC2 instance type",