Alle Beiträge von torbatux

How To analyze Performance Issues under Linux

Here I just would like to give an overview over standard Linux Tools, with which you can analyze performance Issues, from memory over IO-Waits and so on …

How to analyze on different levels Performance issues under Linux

I found a similar drawing some weeks ago, a colleague pointet out, that it initialy comes from Brendan Gregg, I extended it a little bit for documentation purposes, so enjoy.

PowerDNS + PowerAdmin with Master/Slave replication

I think it is self explaining, what we want to do, Bind is a little bit monolitic and has no api for flexible and dynamic
creation of machines (okay there are some aproaches, but anyhow), Designate was not working well for me … so I started with PowerDNS.
Here are my install notes:

sudo su

Install Epel repository:

yum install epel-release.noarch

Update the system (if not already done)

yum -y update

PowerDNS + PowerAdmin with Master/Slave replication weiterlesen

Build a multi Node Openstack Environment with Openvswitch

Since I have some time to write again I would like to share a small HowTo, how to Install a multi Node Openstack install with Openvswitch (ovs) and provider Networks as vlans for mixed Environments. At the end I will also add a subsection how to add a second vlan and a script how to add tenants, users and internal Networks for the tenants.

The whole Setup is made with Devstack, some bash-scripts. What you should look at, is for sure multi homing (iproute2) and a general documentation about
openvswitch and HowTo operate Openstack with provider networks. Over all this Documentation should be doable also without this (hopefully) and hopefully I have no typos 😉

Lets assume we have 3 networks / vlans
1. Network is the Management Network (for the communication between the nodes and for the webinterface -> Horizon)
The network is: lets say vlan 29 this must be tagged (access port) on the switch / bladecenter –> as vlan 29 HINT: this is the „Segmentation ID“ the gateway is at the end:
Build a multi Node Openstack Environment with Openvswitch weiterlesen

Opencontainer runc on Ubuntu 14.04


running golang with golang path set and golang-bin path set … okay refresh here, if not yet done

## create a working directory

mkdir -pv ~/gocode/

vim ~/.profile

## add this two lines

export GOPATH=/home/tbade/gocode

export PATH=$PATH:$GOPATH/bin

## check out also FIX 2 down below (to install latest Golang)

The normal way of using runC …

# create a ‚‘ in your GOPATH
git clone
cd runc
sudo make install

I had some Issues with Linux Mint17 and Ubuntu 14.04, while building runc … and a small workaround fo fix it:

tbade@torbuntu:~/gocode/$ make
go build -o runc .
checkpoint.go:11:2: cannot find package „“ in any of:
/usr/lib/go/src/pkg/ (from $GOROOT)
/home/tbade/gocode/ (from $GOPATH)
spec_linux.go:13:2: cannot find package „“ in any of:
/usr/lib/go/src/pkg/ (from $GOROOT)
/home/tbade/gocode/ (from $GOPATH)
restore.go:13:2: cannot find package „“ in any of:
/usr/lib/go/src/pkg/ (from $GOROOT)
/home/tbade/gocode/ (from $GOPATH)
spec_linux.go:15:2: cannot find package „“ in any of:
/usr/lib/go/src/pkg/ (from $GOROOT)
/home/tbade/gocode/ (from $GOPATH)
main_unix.go:5:8: cannot find package „“ in any of:
/usr/lib/go/src/pkg/ (from $GOROOT)
/home/tbade/gocode/ (from $GOPATH)
restore.go:14:2: cannot find package „“ in any of:
/usr/lib/go/src/pkg/ (from $GOROOT)
/home/tbade/gocode/ (from $GOPATH)
make: *** [all] Error 1

FIX Issue 1

tbade@torbuntu:~/gocode/$ cd Godeps/_workspace/src/
tbade@torbuntu:~/gocode/$ ls
Sirupsen codegangsta coreos docker godbus golang syndtr
tbade@torbuntu:~/gocode/$ mkdir opencontainers
tbade@torbuntu:~/gocode/$ cd opencontainers/
tbade@torbuntu:~/gocode/$ git clone
Cloning into ‚runc’…


tbade@torbuntu:~/gocode/$ make
go build -o runc .
Godeps/_workspace/src/ internal compiler error: unknown etype 0/STRUCT
make: *** [all] Error 2

PROBLEM is go version 1.2 / 1.2.1 which is the default in Mint 17/Ubuntu 14.04 (tested on both)
FIX Issue 2

sudo apt-get remove golang golang-tools
sudo su
cd /usr/local/
tar -C /usr/local -xzf go1.4.2.linux-amd64.tar.g
rm go1.4.2.linux-amd64.tar.gz
vim /etc/profile
# put inside:
export PATH=$PATH:/usr/local/go/bin

—- Logout / Login … its working afterwards … —-

But now Docker is to old …
Upgrade to latest Docker

sudo apt-get update -y && sudo apt-get upgrade -y

sudo sh -c „echo deb docker main >/etc/apt/sources.list.d/docker.list“

sudo apt-key adv –keyserver hkp:// –recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

sudo apt-get -y update

sudo apt-get install -y lxc-docker

# now you can check the docker version, it should be more actual version than 1.0.2
Start first runC

docker version

docker pull ubuntu:latest

docker export $(docker create ubuntu) > ubuntu_latest.tar

mkdir rootfs

tar -C rootfs -xf ubuntu_latest.tar

vim config.json

„version“: „0.1.1“,
„platform“: {
„os“: „linux“,
„arch“: „amd64“
„process“: {
„terminal“: true,
„user“: „daemon“,
„args“: [
„env“: [
„cwd“: „“
„root“: {
„path“: „rootfs“,
„readonly“: true
„hostname“: „shell“,
„mounts“: [
„type“: „proc“,
„source“: „proc“,
„destination“: „/proc“,
„options“: „“
„type“: „tmpfs“,
„source“: „tmpfs“,
„destination“: „/dev“,
„options“: „nosuid,strictatime,mode=755,size=65536k“
„type“: „devpts“,
„source“: „devpts“,
„destination“: „/dev/pts“,
„options“: „nosuid,noexec,newinstance,ptmxmode=0666,mode=0620,gid=5“
„type“: „tmpfs“,
„source“: „shm“,
„destination“: „/dev/shm“,
„options“: „nosuid,noexec,nodev,mode=1777,size=65536k“
„type“: „mqueue“,
„source“: „mqueue“,
„destination“: „/dev/mqueue“,
„options“: „nosuid,noexec,nodev“
„type“: „sysfs“,
„source“: „sysfs“,
„destination“: „/sys“,
„options“: „nosuid,noexec,nodev“
„linux“: {
„namespaces“: [
„type“: „process“
„type“: „network“
„type“: „mount“
„type“: „ipc“
„type“: „uts“
„capabilities“: [
„devices“: [

sudo runc

# now you can check if you are inside of runc … with ps

Build with packer qcow2 images (e.g. for OpenStack)

First of all, what is Packer?

Packer is an opensource tool for automated creation of identical machine images
for multiple platforms from a single source configuration. That means OpenStack, Vagrant, VirtualBox, Amazon E2 or even docker container.

Packer handles the different virtualization platforms with the integration of plugins, which are then called by the build scripts for the desired virtualization platform .

So here I use the kvm build environment to build a qcow2 image for my OpenStack environment. Think about it, you can easily build up a Jenkins or Go job for automated builds, integrate a checked out source code and deploy a complete … e.g. Test environment for performance Tests … that’s quite cool … or behind LBaaS … start a new instance in OpenStack from latest stable Release … let’s start …
Build with packer qcow2 images (e.g. for OpenStack) weiterlesen

IRCD inside Docker HowTo

This HowTo is to explain how to install an IRC Server inside of a Docker Container,
for testing purposes I also installed vim (just take a look at the Dockerfile …) but it was
for testing only, you can leave it out.

1. Become root
2. Type in:
docker info (just to see if docker is installed)
if „command not found“ shows up, you have to install docker-io
3. create a new folder to store config files (to copy inside the container) and the Dockerfile
(config file for docker to build images)
mkdir -pv ~/Dockerfiles/ircd
cd ~/Dockerfiles/ircd
create an ircd.conf
(a lot of examples can be found on net, this HowTo should not show,
how to configure ircd, it should show, how to create own Docker Container)

IRCD inside Docker HowTo weiterlesen

sms client/server first try

I tried now my first version of server/client system to deliver
sms from one Host to another, I spend now 2 hours, to build a first test Version, and it is
in basic running, will move it to an external git, when I have a first Beta, this is in general running but more or less a case study, have to be finished, then cleaned and secured (auth+crypt):
If you have hints/comments … fell free to post. sms client/server first try weiterlesen

sms python3 script client/server

I’ll try to build a client/server environment using python3.
At the end, this script should do the following, take an incomming email, parse it
so that we just have the Bodytext + Subject, and send it trough python socket server to the
„smsserver“ which sends it to a bunch of different telephone numbers, depending on the
mailsender. sms python3 script client/server weiterlesen