Skip to content

Instantly share code, notes, and snippets.

View paulczar's full-sized avatar

Paul Czarkowski paulczar

View GitHub Profile
@paulczar
paulczar / c:\temp\vmdriverhack.reg
Created December 9, 2012 23:31
registry hack for windows vm migration
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\primary_ide_channel]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="atapi"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\secondary_ide_channel]
"ClassGUID"="{4D36E96A-E325-11CE-BFC1-08002BE10318}"
"Service"="atapi"
# redis-cli info
redis_version:2.2.5
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
process_id:29465
uptime_in_seconds:371
uptime_in_days:0
lru_clock:1378336
@paulczar
paulczar / gist:4369921
Created December 24, 2012 16:37
top output from logstash/elasticsearch server showing two logstash-indexers running.
top - 16:33:42 up 19 days, 19:51, 1 user, load average: 1.74, 1.41, 1.42
Tasks: 382 total, 1 running, 380 sleeping, 0 stopped, 1 zombie
Cpu(s): 17.2%us, 2.2%sy, 0.0%ni, 79.9%id, 0.0%wa, 0.0%hi, 0.6%si, 0.0%st
Mem: 49541808k total, 6487760k used, 43054048k free, 156548k buffers
Swap: 51642360k total, 40856k used, 51601504k free, 1255156k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3979 root 20 0 32.2g 2.3g 10m S 60.4 4.8 24:55.91 java # elasticsearch
7032 root 20 0 24.3g 718m 12m S 196.3 1.5 75:04.11 java # logstash
10312 root 20 0 14.6g 407m 11m S 156.8 0.8 49:35.96 java # logstash2
@paulczar
paulczar / logstash-perf.md
Last active May 14, 2018 03:13
logstash performance deets

Logstash Performance Testing

Server Details

HP BL460

  • 48 Gb Memory
  • 2 x X5675 @ 3.07GHz
  • 2 x 10 gbps NIC
  • 2tb NetApp NFS volume for ES data
@paulczar
paulczar / gist:5459528
Created April 25, 2013 13:04
openstack chef broked.
using https://github.com/rcbops/chef-cookbooks inside vagrant with a chef 10.x Server and Chef 10.x client/knife etc.
vagrant@chef:~/chef-cookbooks$ knife node show allinone
Node Name: allinone
Environment: example_environment
FQDN: allinone
IP: 10.0.2.15
Run List: role[allinone]
Roles:
@paulczar
paulczar / gist:5493708
Created May 1, 2013 04:16
Patch to fix libiconv for glibc >= 2.16 - originally found at http://www.itkb.ro/kb/linux/patch-libiconv-pentru-glibc-216
--- srclib/stdio.in.h.orig 2011-08-07 16:42:06.000000000 +0300
+++ srclib/stdio.in.h 2013-01-10 15:53:03.000000000 +0200
@@ -695,7 +695,9 @@
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
@paulczar
paulczar / gist:5610433
Created May 20, 2013 04:34
steps to create network under quantum for vagrant openstack example.
root@allinone:~# OS_USERNAME=admin OS_PASSWORD=secrete OS_TENANT_NAME=admin OS_AUTH_URL=http://33.33.33.60:35357/v2.0 keystone tenant-list
+----------------------------------+---------+---------+
| id | name | enabled |
+----------------------------------+---------+---------+
| 4c280f7ee4404e42bc8994ee37d06ee3 | admin | true |
| fd1f4ef9051849359347f1f6a78a4b58 | service | true |
+----------------------------------+---------+---------+
root@allinone:~# quantum net-create --tenant-id 4c280f7ee4404e42bc8994ee37d06ee3 test_net
You must provide a username via either --os-username or env[OS_USERNAME]
root@allinone:~# OS_USERNAME=admin OS_PASSWORD=secrete OS_TENANT_NAME=admin OS_AUTH_URL=http://33.33.33.60:35357/v2.0 quantum net-create --tenant-id 4c280f7ee4404e42bc8994ee37d06ee3 test_net
@paulczar
paulczar / gist:5777035
Created June 13, 2013 20:26
git rebase output
git clone git@github.com:paulczar/chef-cookbooks.git
cd chef-cookbooks
git checkout folsom
git pull git@github.com:rcbops/chef-cookbooks.git folsom
git checkout vagrant
git rebase folsom
git push
here it complained that I was behind ... so ran a pull then the push.
@paulczar
paulczar / gist:5777094
Created June 13, 2013 20:32
git rebase redux
$ git clone --recursive -b folsom git@github.com:paulczar/chef-cookbooks.git
$ cd chef-cookbooks
$ git pull git@github.com:rcbops/chef-cookbooks.git folsom
$ git checkout vagrant
$ git rebase folsom
First, rewinding head to replay your work on top of it...
Applying: adding keystone-setup role
Applying: keystone role now uses keystone-setup role
Applying: Unwinding merge 78a339509
Applying: vagrantfile and provisioning scripts
@paulczar
paulczar / Dockerfile
Created June 14, 2013 03:38
Chef-Zero Docker File
# Chef-Zero
#
# VERSION 0.0.1
FROM base
MAINTAINER Paul Czarkowski "username.taken@gmail.com"
RUN apt-get update
RUN apt-get install -y ruby1.9.1-dev build-essential