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
input { whatever } | |
filter { grok { pattern => "%{COMBINEDAPACHELOG}" } } output { statsd { increment => "apache.status.%{response}" } } |
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
This works under Ubuntu 10.10. I tried under 10.04 LTS but the Ubuntu templates are not there. Investigating. | |
[ Leaving this link here for reference in case I need to do apt-get upgrade. @ohloh recommends it | |
http://sourceforge.net/mailarchive/message.php?msg_id=26885493 ] | |
To make things easy have libvirt installed ie. | |
sudo apt-get install libvirt-bin | |
Otherwise you will need to set up bridges, iptables, dnsmasq. |
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
from socket import * | |
from xdrlib import Packer, Unpacker | |
# Set the socket parameters | |
host = "localhost" | |
port = 1234 | |
buf = 1024 | |
addr = (host,port) | |
slope_str2int = {'zero':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
Two INTEL SSDSA2CW300G3 in RAID 0 array | |
> tiotest -t 8 -f 2048 -r 500 -b 4096 -d /mnt/test | |
Tiotest results for 8 concurrent io threads: | |
,----------------------------------------------------------------------. | |
| Item | Time | Rate | Usr CPU | Sys CPU | | |
+-----------------------+----------+--------------+----------+---------+ | |
| Write 16384 MBs | 39.3 s | 416.452 MB/s | 298.5 % | 229.5 % | | |
| Random Write 16 MBs | 0.3 s | 53.267 MB/s | 35.4 % | 134.0 % | | |
| Read 16384 MBs | 3.1 s | 5348.594 MB/s | 4770.1 % | 1515.4 % | |
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
<?php | |
$rrd_file = "/var/lib/ganglia/rrds/Test Cluster/localhost.localdomain/load_one.rrd"; | |
$command = "/usr/bin/rrdtool xport --start '-600s' --end '-30s' "; | |
$command .= " --daemon unix:/tmp/rrdcached.limited.sock "; | |
$command .= "DEF:'sum'='" . $rrd_file . ":sum':AVERAGE XPORT:sum:metric_value VDEF:D2=sum,LSLSLOPE "; | |
$command .= "VDEF:H2=sum,LSLINT CDEF:avg2=sum,POP,D2,COUNT,*,H2,+ XPORT:avg2:trend"; |
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/bash | |
if [ $# -ne 3 ]; then | |
echo "You need to supply both JMX host and port and metric. Exiting ..." | |
exit 1 | |
fi | |
JAVA_BIN="/usr/bin/java" | |
JMX_CMDLINE="/opt/ganglia/cmdline-jmxclient-0.10.3.jar" | |
GMETRIC_BIN="/usr/bin/gmetric -d 180" |
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
# date | |
Tue Jan 1 02:46:29 UTC 2013 | |
# ntpdate -q time.apple.com | |
server 17.171.4.13, stratum 16, offset -0.994684, delay 0.03630 | |
server 17.151.16.22, stratum 16, offset -0.994590, delay 0.10086 | |
server 17.151.16.21, stratum 16, offset -0.995015, delay 0.10132 | |
server 17.151.16.20, stratum 15, offset -0.995329, delay 0.10136 | |
server 17.151.16.23, stratum 15, offset -0.995040, delay 0.10164 | |
server 17.171.4.33, stratum 15, offset -0.994484, delay 0.03622 | |
server 17.171.4.34, stratum 16, offset -0.994793, delay 0.03615 |
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 -v http://www.codeanywhere.net | |
* About to connect() to www.codeanywhere.net port 80 (#0) | |
* Trying 168.61.33.86... | |
* Connected to www.codeanywhere.net (168.61.33.86) port 80 (#0) | |
> GET / HTTP/1.1 | |
> User-Agent: curl/7.29.0 | |
> Host: www.codeanywhere.net | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK |
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 ruby | |
# coding: UTF-8 | |
# install_phantomjs.rb | |
# | |
# download, build, and install PhantomJS for Raspberry Pi | |
# | |
# * tested: PhantomJS 1.9.7 / Raspbian (Wheezy) | |
# | |
# created on : 2014.02.13 |
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
$ mtr -c 20 -r -w -z x.x.x.x | |
Start: Sat Dec 27 11:19:47 2014 | |
HOST: xxxxxx Loss% Snt Last Avg Best Wrst StDev | |
<snip> | |
3. AS11426 gig10-0-0-424.rlghnca-rtr2.nc.rr.com 0.0% 20 19.2 25.6 10.6 73.2 13.1 | |
4. AS11426 cpe-024-025-062-150.ec.res.rr.com 0.0% 20 14.2 14.3 10.8 36.4 5.3 | |
5. AS11426 be31.chrcnctr01r.southeast.rr.com 0.0% 20 16.7 20.6 16.7 23.5 1.8 | |
6. AS7843 bu-ether34.atlngamq46w-bcr00.tbone.rr.com 0.0% 20 28.5 24.7 20.6 33.9 3.6 | |
7. AS7843 bu-ether21.atlngamq47w-bcr01.tbone.rr.com 0.0% 20 27.6 25.7 22.2 32.8 3.0 | |
8. AS7843 107.14.17.190 0.0% 20 25.0 24.0 20.1 61.9 9.0 |