Skip to content

Instantly share code, notes, and snippets.

@caglar10ur
caglar10ur / gist:8461601
Last active January 3, 2016 12:19
configure flags for cgmanager
CFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" CPPFLAGS="-D_FORTIFY_SOURCE=2" CXXFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" FFLAGS="-g -O2" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro" ./configure --prefix=/usr --sysconfdir=/etc --bindir=/bin --sbindir=/sbin --libdir=/lib/x86_64-linux-gnu/ --localstatedir=/var
@caglar10ur
caglar10ur / cgmanager.conf
Created January 16, 2014 19:24
/etc/init/cgmanager.conf
description "cgroup management daemon"
author "Serge Hallyn <serge.hallyn@ubuntu.com>"
respawn
# in trusty /sys/fs/cgroup will be mounted for us.
# prior to saucy, we would need to start on mounted
# MOUNTPOINT=/sys, and mount /sys/fs/cgroup ourselves
start on mounted MOUNTPOINT=/sys/fs/cgroup
[caglar@qp:~/go/src/github.com/caglar10ur/lxc(devel)] make test
==> Running go test
=== RUN TestVersion-2
--- PASS: TestVersion-2 (0.00 seconds)
lxc_test.go:40: LXC version: 1.0.0.beta2
=== RUN TestDefaultConfigPath-2
--- PASS: TestDefaultConfigPath-2 (0.00 seconds)
=== RUN TestSetConfigPath-2
--- PASS: TestSetConfigPath-2 (0.00 seconds)
=== RUN TestGetContainer-2
@caglar10ur
caglar10ur / gist:8077658
Created December 22, 2013 02:12
process_lock
root 534 0.0 0.5 1426600 10264 ? Ss 21:03 0:00 lxc-test-concurrent -j 20 -i 100
root 570 0.0 0.0 2260 496 ? Ss 21:03 0:00 \_ init
root 650 0.0 0.0 2260 260 ? Ss 21:03 0:00 \_ /bin/sh /etc/init.d/rcS
root 659 0.0 0.0 2260 264 ? S 21:03 0:00 | \_ /bin/udhcpc
root 652 0.0 0.0 2260 276 ? Ss 21:03 0:00 \_ /bin/syslogd
root 547 0.0 0.5 1434800 10276 ? Ss 21:03 0:00 lxc-test-concurrent -j 20 -i 100
root 657 0.0 0.0 2260 496 ? Ss 21:03 0:00 \_ init
root 863 0.0 0.0 2260 260 ? Ss 21:03 0:00 \_ /bin/sh /etc/init.d/rcS
root 873 0.0 0.0 2260 264 ? S 21:03 0:00 | \_ /bin/udhcpc
root 870 0.0 0.0 2260 272 ? Ss 21:03 0:00 \_ /bin/syslogd
@caglar10ur
caglar10ur / gist:8034412
Created December 19, 2013 04:25
stuck concurrent start
Iteration 66/100 maxfd:3
Executing (create) for 10 containers...
Executing (start) for 10 containers...
Executing (stop) for 10 containers...
Executing (destroy) for 10 containers...
Iteration 67/100 maxfd:3
Executing (create) for 10 containers...
Executing (start) for 10 containers...
@caglar10ur
caglar10ur / lxc.net
Last active December 31, 2015 16:19
LXC Network@Raspik
#!/bin/sh
### BEGIN INIT INFO
# Provides: lxc
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: LXC Bridge
### END INIT INFO
@caglar10ur
caglar10ur / martini.go
Created December 1, 2013 06:00
martini with pprof
package main
import (
"github.com/codegangsta/martini"
"net/http/pprof"
)
func main() {
m := martini.Classic()
@caglar10ur
caglar10ur / Go 1.2
Last active December 23, 2015 16:29
Go 1.2
go get code.google.com/p/go.tools/cmd/godoc
go get code.google.com/p/go.tools/cmd/vet
go get code.google.com/p/go.tools/cmd/cover
go get github.com/golang/lint/golint
go get -u code.google.com/p/go.tools/cmd/godoc
go get -u code.google.com/p/go.tools/cmd/vet
go get -u code.google.com/p/go.tools/cmd/cover
go get -u github.com/golang/lint/golint
@caglar10ur
caglar10ur / gist:5273191
Last active December 15, 2015 14:19
configure flags for LXC
ubuntu:
CFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" CPPFLAGS="-D_FORTIFY_SOURCE=2" CXXFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" FFLAGS="-g -O2" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro" ./configure --prefix=/usr --sysconfdir=/etc --bindir=/usr/bin --libdir=/usr/lib/x86_64-linux-gnu/ --libexecdir=/usr/lib/x86_64-linux-gnu/ --with-rootfs-path=/usr/lib/x86_64-linux-gnu/lxc --localstatedir=/var --includedir=/usr/include --enable-tests --enable-cgmanager
fedora20:
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-python --disable-rpath --with-init-script=s
@caglar10ur
caglar10ur / gist:4973291
Created February 17, 2013 20:29
XBMC on raspik
sudo echo "deb http://archive.mene.za.net/raspbian wheezy contrib" > /etc/apt/sources.list.d/mene.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED
sudo apt-get update
sudo apt-get install xbmc