java - How to make JVM hang for a given time period? -
i trying simulate gc in local environment. there way can make jvm hang 5 mins?
if on linux system (most other unixes have this), can do
pkill -stop java; sleep $(( 5 * 60 )); pkill -cont java
to pause java process 5 minutes.
pkill -tstp java; sleep $(( 5 * 60 )); pkill -cont java
is less agressive.
but nowhere garbage collector break.
Comments
Post a Comment