Setting Hang Detection policy using wsadmin script

You can set the hang detection policy using the following admin script

server = AdminControl.completeObjectName("type=Server,*")
# Print existing values of the attributes to console
print AdminControl.getAttribute(server,"threadMonitorInterval")
print AdminControl.getAttribute(server,"threadMonitorThreshold")
print AdminControl.getAttribute(server,"threadMonitorAdjustmentThreshold")

# Set new attribute values

Please note one very important point that AdminControl object is used for making changes in the runtime environment, so the changes that you make using this script would be effective immediately, and you will loose those changes if you restart the server

I could not find attribute that allows you to generate javacore on hanged thread.

No comments: