Skip to content

Instantly share code, notes, and snippets.

@veysby
veysby / activemq.txt
Last active April 20, 2020 10:08
Activemq: check health status using REST API
$curl http://localhost:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost,service=Health
{"timestamp":1449776947,"status":200,"request":{"mbean":"org.apache.activemq:brokerName=localhost,service=Health,type=Broker","type":"read"},"value":{"CurrentStatus":"Good"}}
@veysby
veysby / jmx_opts.sh
Last active December 10, 2015 20:08
SH: JMX options for Java applications
JMX_OPTS="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote"
JMX_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JMX_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote.port=1100"
@veysby
veysby / javactrl.sh
Last active December 10, 2015 21:07
SH: wrapper for Java applications
#!/bin/sh
invoke_help() {
cat << EOF
Usage: $0 -a <ACTION> [-f] [-h]
-a : ACTION, where ACTION is one of:
start : Start the service in the background
stop : Stop the service
status : Show status
@veysby
veysby / gist:c6fa540da3bc7baf682aec1ebdc321a6
Created July 13, 2016 15:54
CMD: check is specific port open
netstat -an | findstr /C:1158