Last active
October 14, 2016 00:12
-
-
Save cogumbreiro/90d58d41e648cfce45005509500e2b94 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
FREQUENCY=20ms | |
"$@" & | |
jid=$! | |
trap cleanup INT | |
function cleanup() { | |
kill $jid | |
} | |
(jstat -gc $jid $FREQUENCY > jstat.log || exit -1) | |
wait $jid | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment