Aujourd'hui j'ai du debug un bout d'app Java bien ancienne. Toujours du pur bonheur, ça me rappelle le Master :)
Bon, c'est bien comme je pensais, ça ne sert plus à grand chose en 2016.
JBoss provides a simple command line tool that allows for interaction with a remote JMX server instance. This tool is called twiddle (for twiddling bits via JMX) and is located in the bin directory of the distribution. Twiddle is a command execution tool, not a general command shell.
framework java utilisé pour le projet en RIE
'Saying that Java is nice because it works on every OS is like saying that anal sex is nice because it works on every gender.'
LOL via Skunnyk
Comment créer un script d'init pour une application java.
EDIT : ce truc n'a pas marché pour moi :
s=ps -C 'java -jar /path/to/application.jar' -o pid h
Du coup, j'ai remplacé par :
s=$(pgrep --full 'une string unique qui identifie la command line pour lancer mon jar')
#
#
#
check_status() {
s=ps -C 'java -jar /path/to/application.jar' -o pid h
if [ $s ] ; then
return $s
fi
return 0
}
start() {
check_status
pid=$?
if [ $pid -ne 0 ] ; then
echo "The application is already started"
exit 1
fi
echo -n "Starting application: "
java -jar /path/to/application.jar >> /path/to/logfile 2>&1 &
echo "OK"
}
stop() {
check_status
pid=$?
if [ $pid -eq 0 ] ; then
echo "Application is already stopped"
exit 1
fi
echo -n "Stopping application: "
kill -9 $pid &
echo "OK"
}
status() {
check_status
if [ $? -ne 0 ] ; then
echo "Application is started"
else
echo "Application is stopped"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0
Tool pour monitorer des values exposées en jmx
$>beans
$>bean java.lang:name=G1\ Eden\ Space,type=MemoryPool
$> info
$> get XXX
echo "beans" | java -jar jmxterm-1.0-alpha-4-uber.jar --url localhost:9010 -n|grep -i garbage
echo "get -b java.lang:type=Memory HeapMemoryUsage" | java -jar jmxterm-1.0-alpha-4-uber.jar --url localhost:9010 -n
echo "get -b java.lang:name=G1\ Eden\ Space,type=MemoryPool CollectionUsage" | java -jar jmxterm-1.0-alpha-4-uber.jar --url localhost:9010 -n
or use input file
pid=$(ps...)
java -jar jmxterm-1.0-alpha-4-uber.jar -n <<EOF
open $pid
beans
EOF
ArrayList<DeviceId> reslist = new ArrayList<DeviceId>();
reslist.add....
return reslist.toArray(new DeviceId[reslist.size()]);
Comment empecher le browser de mettre en cache le contenu d'une response.
How to run a jar the daemon way under linux