This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server side : | |
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=1099 -Djava.rmi.server.hostname=127.0.0.1 -Djava.rmi.server.useLocalHostname=true | |
Client side : | |
Forward port 1099 ==> ssh -L 1099:localhost:1099 username@serverip | |
Download this logging properties file : http://blogs.oracle.com/jmxetc/resource/logging.properties | |
start jconsole using the downloaded properties file : | |
$ jconsole -debug -J"-Djava.util.logging.config.file=logging.properties" localhost:1099 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Heap dump | |
jmap -dump:format=b,file=heapdump.b pid | |
#Just stacktraces | |
jstack pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.tools.logging :as log]) | |
(import '(java.util.concurrent Executors)) | |
(defn t [f expected nthreads niters] | |
(let [pool (Executors/newFixedThreadPool nthreads) | |
tasks (map (fn [t] | |
(fn [] | |
(dotimes [n niters] | |
(let [res (f)] | |
(when (not= res expected) | |
(log/info "Result is not expected : " res)))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2013-10-08 10:28:39 | |
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode): | |
"New I/O worker #9" prio=10 tid=0x000002a9f0180800 nid=0x75ba runnable [0x000002a9bb5a1000] | |
java.lang.Thread.State: RUNNABLE | |
at java.lang.StringBuilder.append(StringBuilder.java:119) | |
at com.sun.net.ssl.internal.ssl.ProtocolVersion.valueOf(ProtocolVersion.java:93) | |
at com.sun.net.ssl.internal.ssl.ProtocolVersion.valueOf(ProtocolVersion.java:105) | |
at com.sun.net.ssl.internal.ssl.EngineInputRecord.bytesInCompletePacket(EngineInputRecord.java:89) | |
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:798) | |
at com.sun.net.ssl.internal.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:713) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Messages stored in 2.777 secs | |
Messages stored in 0.693 secs <-- one transaction sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clj-demo.core | |
(:require [cheshire.core :as json])) | |
(foo :toto) | |
(defn factoriel | |
[n] | |
(->> n range (map inc) (reduce *))) | |
(factoriel 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import 'org.apache.activemq.camel.component.ActiveMQComponent) | |
... | |
(defn- ^String activemq-source-path | |
[{:keys [user password broker-url topic] :as consumer-config}] | |
(format "activemq:topic:%s?username=%s&password=%s" | |
topic | |
user | |
password)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am obohrer on github. | |
* I am oliverro (https://keybase.io/oliverro) on keybase. | |
* I have a public key ASAA6_YvLOeP4WeTz6NQCW2t2U02p0bg2N_9zpGAmWtx6Ao | |
To claim this, I am signing this object: |