Skip to content

Instantly share code, notes, and snippets.

View mmgaggle's full-sized avatar

Kyle Bader mmgaggle

View GitHub Profile
@mmgaggle
mmgaggle / readme.md
Created July 18, 2012 15:18 — forked from jordansissel/readme.md
logstash + you + me.

logstash needs full time love.

There are roughly 70 code contributors to the logstash project as of today. Many more exist as helpful folks on IRC and the mailling list. Others post awesome bug reports and feature requests. The community is simply awesome.

I've been working on logstash for about 2 years. All as a hobby - all part-time. About 70% of the current content (commits, 'git blame' lines, etc) are by me.

Unfortunately, I've never used logstash in production. (Embarrassing, I know!)

I'm embarrassed to answer user questions like "How do I optimize elasticsearch's storage?" with "Sorry, I've never used elasticsearch outside of my laptop."

@mmgaggle
mmgaggle / gist:4577374
Created January 20, 2013 08:58
Come at me bro.
* System-wide ASLR: PaX ASLR enabled
* Does the CPU support NX: Yes
COMMAND PID RELRO STACK CANARY NX/PaX PIE
init 1 Full RELRO Canary found PaX enabled PIE enabled
systemd-udevd 1633 Full RELRO Canary found PaX enabled PIE enabled
syslog-ng 2436 Full RELRO Canary found PaX enabled PIE enabled
syslog-ng 2437 Full RELRO Canary found PaX enabled PIE enabled
svscan 2450 Full RELRO Canary found PaX enabled PIE enabled
@mmgaggle
mmgaggle / gist:6892868
Created October 8, 2013 22:26
ipv6 /etc/hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
@mmgaggle
mmgaggle / gist:7836991
Created December 7, 2013 03:37
vagrant up... ceph cluster!
vagrant@cephmon:~$ sudo ceph -s
cluster cf376172-55ef-410b-a1ad-b84d9445aaf1
health HEALTH_OK
monmap e1: 1 mons at {cephmon=192.168.3.101:6789/0}, election epoch 2, quorum 0 cephmon
osdmap e9: 2 osds: 2 up, 2 in
pgmap v15: 192 pgs: 192 active+clean; 0 bytes data, 70956 KB used, 10628 MB / 10697 MB avail
mdsmap e1: 0/0/1 up
@mmgaggle
mmgaggle / gist:7882220
Created December 9, 2013 22:34
vagrant-aws broken?
kyle@synapse ~/vagrant-aws $ > cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
if Vagrant.has_plugin?('vagrant-cachier')
puts 'Plugin detected!'
end
end
@mmgaggle
mmgaggle / gist:7953750
Created December 13, 2013 23:54
numa-maps-summary
kyle@synapse ~ $ > ./numa-maps-summary.pl < gistfile1.txt
N0 : 41397 ( 0.16 GB)
N1 : 20625 ( 0.08 GB)
active : 48558 ( 0.19 GB)
anon : 60595 ( 0.23 GB)
dirty : 60413 ( 0.23 GB)
mapmax : 924 ( 0.00 GB)
mapped : 1432 ( 0.01 GB)
swapcache : 185 ( 0.00 GB)
[global]
...
[mon]
....
[client.$(name)]
rbd cache = true
...
@mmgaggle
mmgaggle / fio.sh
Last active August 29, 2015 14:27
#!/bin/bash
uuid=$(uuidgen)
mkdir -p /tmp/${uuid}.out/collectl
echo " [+] starting collectl"
sudo collectl -s+mYZ -i 1:10 -F0 -f /tmp/${uuid}.out/collectl
echo " [+] waiting 60s to establish baseline"
sleep 60
echo " [+] starting single disk fio"
for i in $( ls /dev/disk/by-path/pci-0000\:03\:00.0-sas-0x5000c500587* | head -n1)
<disk type='network' device='disk'>
<driver name='qemu'/>
<auth username='libvirt'>
<secret type='ceph' uuid='d41d3f5b-b437-4684-8e1c-65d365d00046'/>
</auth>
<source protocol='rbd' name='cbtmysql-pool/centos7nodexx'>
<host name='172.18.174.21' port='6789'/>
</source>
<target dev='vdb' bus='scsi'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
#define _GNU_SOURCE
#include<stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
int main ()
{
FILE *fp;