Java script for hung thread detection in webmethods

Hi All,

Anybody pls help me on how to write a java script for the concept " detection of hung threads" in webmethods Integration servers. I am in a plan to place and run the java script in all our servers inorder to detect hung threads.

Idea: To detect hung threads in IS server.
Parameters: 1) To count number of hung threads found in server suppose by giving some limit to threshold value.
2) To take threaddump
3) To delete the threads and restart the IS automatically

Please provide me any sample java script if you have implemented any such.

Please go through, http://blog.hussulinux.com/2009/01/webmethods-kill-a-running-service-from-integration-server/
url which may be helpful :slight_smile:

Thanks,

Hi Varalakshmi,

first of all you will have to define a verifiable criteria for how to determine if a thread is really hung or only busy for a long time.

Regards,
Holger

Code snipped posted in the above link will not work all the time as expected (in my experience). However you cant write the java script directly, first you have define some API (webMethods flow services) to actually invoke them via UI. The UI code can be on js,ajax,html etc

As per my knowledge starting from wM 8.2 IS and above you have an option to check the currently running services for a longer time (threads) and you can either cancel the thread or kill a thread if you are sure that it must. I would like to suggest you to check the actual flow/java services being called on the back end. In this way you will be able to get the current thread and you can accomplish your job. You can also generate thread dump from WmRoot services, even restart of IS can be achieved. Moreover you may also explore command central if provides any out-of-the-box feature to handle such requirements as I have not fully explored CC.

1 Like

I used the same java code a few months back on wM 8 version, it worked for me. So I suggested to have a look, it’s upto the requestor to make use of or not based on fitting critieria :smiley:

Thanks,

MR,
Its just my point of opinion (as I experienced it in the past) and wanted to share here. And of course its up to the requester to make use of it or not. Moreover I never made a statement that it will not work at all :slight_smile: :slight_smile:

I am unable to access " http://blog.hussulinux.com/2009/01/webmethods-kill...rvice-from-integration-server/".

Please paste me the lines of java code here

Hi ,

Could any one please paste me the java script lines of detecting thread dumps ? I am unable to access the urls pasted below.