A simple python script to visualise the JVM heap of a process in real-time from the output of jstat
Input can be from stdin or a 0mq socket. Pyqtgraph is used for visualisation.
-
Pipe the output of jstat directly to the script:
jstat -gc $(jps <jvm-process-name>) 100ms | vjstat -i 100 -w 10000
-
Connect to a 0mq socket where the output of
jstat
is being published:jstat -gc $(jps <jvm-process-name) 1s | zmqpp pub 'tcp://*:4242'
vjstat -i 1000 tcp://<host>:4242