Skip to content

Instantly share code, notes, and snippets.

View rhuss's full-sized avatar

Roland Huß rhuss

View GitHub Profile
@rhuss
rhuss / docker-enter.sh
Last active August 29, 2015 14:05
nsenter with boot2docker
View docker-enter.sh
#!/bin/sh
usage ()
{
cat <<EOF
docker-enter -- Enter a running container via boot2docker and nsenter
Usage: docker-enter <container_name_or_ID> [command]
See https://github.com/jpetazzo/nsenter for details.
@rhuss
rhuss / Jolokia (Data Image).xml
Last active August 29, 2015 14:05
docker-maven-plugin configuration Samples
View Jolokia (Data Image).xml
<plugin>
<groupId>org.jolokia</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
<configuration>
<image>
<id>tomcat</id>
<name>consol/tomcat-7.0</name>
<run>
@rhuss
rhuss / gist:a83633c512fe0d0f1f2c
Created May 5, 2015 10:10
Debug output for "jmx4perl tomcat exec jolokia:type=Config debugInfo"
View gist:a83633c512fe0d0f1f2c
1430820552: Execution time: 1 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"Name","type":"read"},"value":"11257@Tichny.local"}
1430820552: Execution time: 0 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"VmVersion","type":"read"},"value":"24.75-b04"}
1430820552: Execution time: 0 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"VmName","type":"read"},"value":"Java HotSpot(TM) 64-Bit Server VM"}
1430820552: Execution time: 0 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"VmVendor","type":"read"},"value":"Oracle Corporation"}
1430820552: Execution time: 0 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"Uptime","type":"read"},"value":98185}
@rhuss
rhuss / gist:b0e1884c990a8351d3e9
Last active August 29, 2015 14:21
Docker-Hammering
View gist:b0e1884c990a8351d3e9

With an empty OpenShift 0.5.1 started up (except for some services) within a Vagrant setup, I noticed, that /var/log/messages grows very fast because of the requests logged below. I could (and have) set the loglevel to WARN but this doesn't solve the issue of many requests needs to be processed by the Docker daemon which leads to a constant CPU usage of about 4-5%. I wonder where these requests for container meta information comes from and why they are sent in such a high frequency (look at the timestamps).

May 21 13:06:52 localhost journal: Suppressed 741 messages from /system.slice/docker.service
May 21 13:06:52 localhost docker: time="2015-05-21T13:06:52Z" level=info msg="GET /containers/json"
May 21 13:06:52 localhost docker: time="2015-05-21T13:06:52Z" level=info msg="+job containers()"
May 21 13:06:52 localhost docker: time="2015-05-21T13:06:52Z" level=info msg="-job containers() = OK (0)"
May 21 13:06:52 localhost docker: time="2015-05-21T13:06:52Z" level=info msg="GET /containers/json?all=1"
View gofabric8 IDEA Setup.md

gofabric8 IDE setup for IntelliJ IDEA

In Shell:

  • export $GOPATH=~/go/workspace
  • mkdir -p $GOPATH
  • export PATH=$PATH:$GOPATH/bin
  • cd ~/go
  • rm -rf workspace/*
  • go get github.com/tools/godep
@rhuss
rhuss / ruler-issue.html
Created June 26, 2012 06:57
Ruler issue with Cubism 1.2.0
View ruler-issue.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css" media="all">
@import url("http://square.github.com/cubism/style.css");
</style>
<script type="text/javascript" src="http://square.github.com/cubism/d3.v2.js"></script>
<script type="text/javascript" src="http://square.github.com/cubism/cubism.v1.js"></script>
</head>
<body>
View gist:3443c7534d6f79db4c54
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ kubernetes-client ---
[INFO] io.fabric8:kubernetes-client:jar:1.3.74-SNAPSHOT
[INFO] +- io.fabric8:kubernetes-model:jar:1.0.42:compile
[INFO] | +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.6.3:compile
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] +- com.squareup.okhttp:okhttp:jar:2.7.2:compile
[INFO] | \- com.squareup.okio:okio:jar:1.6.0:compile
[INFO] +- com.squareup.okhttp:logging-interceptor:jar:2.7.2:compile
[INFO] +- com.squareup.okhttp:okhttp-ws:jar:2.7.2:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.13:compile
View is.yml
apiVersion: v1
kind: ImageStream
metadata:
name: cdi-camel
View gist:035f955dec3828e696112eb640be4ab4
minishift destroy
sudo rm -rf ~/.minishift
brew uninstall xhyve
brew install --force -HEAD xhyve
brew update docker-machine
brew link --overwrite docker-machine
brew unlink docker-machine-driver-xhyve
brew install docker-machine-driver-xhyve
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
View stacktrace jolokia
Starting the Java application using /opt/run-java/run-java.sh ...
exec java -javaagent:/opt/jolokia/jolokia.jar=config=/opt/jolokia/etc/jolokia.properties -cp . -jar /deployments/fabric8-maven-sample-custom-enricher-app-3.3-SNAPSHOT.jar
2017-04-11 10:21:03
Full thread dump OpenJDK 64-Bit Server VM (25.111-b15 mixed mode):
"server-timer" #6 daemon prio=5 os_prio=0 tid=0x00007f2ae020c000 nid=0x68 in Object.wait() [0x00007f2ac07c6000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000eb1eac68> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Timer.java:552)