Skip to content

Instantly share code, notes, and snippets.

View vvuksan's full-sized avatar

Vladimir Vuksan vvuksan

View GitHub Profile
@vvuksan
vvuksan / gist:3100171
Created July 12, 2012 19:03
JMX collection using command line JMX client
#!/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"
@vvuksan
vvuksan / gist:1941115
Created February 29, 2012 14:08
Ganglia alert on trend
<?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";
@vvuksan
vvuksan / gist:1390034
Created November 23, 2011 21:55
Intel SSD drives perf
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 % |
@vvuksan
vvuksan / parser.py
Created November 18, 2011 22:37
Ganglia XDR packet parser
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,
@vvuksan
vvuksan / README
Created August 16, 2011 22:01
LXC (Linux Containers Installation)
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.
@vvuksan
vvuksan / gist:1124364
Created August 4, 2011 02:19
Using Logstash to generate log metrics
input { whatever }
filter { grok { pattern => "%{COMBINEDAPACHELOG}" } } output { statsd { increment => "apache.status.%{response}" } }
@vvuksan
vvuksan / gist:1079081
Created July 12, 2011 22:00
PHP Spec file
%define contentdir /var/www
%define apiver 20041225
%define zendver 20050922
%define pdover 20060409
Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
Name: php
Version: 5.3.0
Release: 1%{?dist}
License: The PHP License v3.01
@vvuksan
vvuksan / gist:1072046
Created July 8, 2011 15:10
Ganglia MonetDB integration
https://github.com/jmlowe/Ganglia-MonetDB-plugin
(16:07:47) jmlowe: monetdb's performance is still very flat 3400 rows, 4.3 msec
(16:11:03) bernardl: jmlowe: this is with gmetad-python constantly updating stuff?
(16:11:13) jmlowe: yes, it's banging away
(16:11:19) bernardl: jmlowe: cool -- host many hosts?
(16:11:24) jmlowe: just one
(16:11:27) bernardl: ok
(16:11:41) bernardl: how easy is it to setup monetdb? is it readily packaged up in Linux?
@vvuksan
vvuksan / gist:1025952
Created June 14, 2011 21:31
Velocity 2011 links
@vvuksan
vvuksan / gist:996051
Created May 27, 2011 20:04
ESC Conference abbrevation. What does it mean ?
For those who have wondered what ESC in ESC Conference stands for. Here is a short guide.
1. (15:50:22) nahamu: Extreme SCalability?
2. (15:50:29) whack: elastic synergy computing
3. (15:50:50) nahamu: "Eh, Something Cool"?
4. (15:51:47) devdas: Extremely Scalable Computing
5. (15:52:27) devdas: Explicitly Scalable Computing?
6. (15:53:03) lusis: eastern seaboard computing?
7. (15:53:15) Cope: Eloquent Sophistry Convention
8 (15:53:28) whack: Enterprise Synergism Combinatorics