cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically dump stack trace

Former Member
0 Kudos

Hi all,

I'd like to address a challenging puzzle (for me at least) in my question: how to collect thread dumps automatically on certain conditions? Existing solutions, approaches, thoughts, custom coding/scripting etc. - any idea appreciated!

Thank you in advance for your reflections.

Regards,

Anton

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anton,

You could try a scripts that trigger a Kill -3 command based on an OS level event . The trick will be linking in the state/condition you want to the the kill -3. If you're not on unix have a look at note 710154 for the events that can trigger a thread dump on the various OS's.

Solution manager can also be used to trigger thread dumps at a pre defined time, see the following URL for details

http://help.sap.com/saphelp_smehp1/helpdata/en/10/3ca29d9ace4b68ac324d217ba7833f/content.htm

Hope this helps in some way,

John

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

You should rather filter them on the conditions, not try to collect them on specific conditions. Log viewer does the filtering for you.

Regards,

Benny

Former Member
0 Kudos

Hello Benny,

I cannot get your idea. I believe thread dump is collected only on demand, i.e. from context menu of Java process in SAP MMC, or on Ctrl-Break etc. In other words, I need a way to take that action automatically, when certain condition is met (like all threads consumed, or response time reaches N sec. etc).

Thank you!

Regards,

Anton

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Oops, sorry for that , I mistekenly interpreted this as error messages.

However, did you try thread dumps in the debugger of NWDS?

Regards,

Benny

Former Member
0 Kudos

Hello Anton,

The engine generates a threaddump in event of a crash e.g. OOM automatically. Howver, there is no way through the engine you can automatically trigger the dumps in the event of hang/slow performance. This needs to be done explicitly - on all server nodes if you have more than one during the time of the issue.

Best Regards,

Snehal Bhaidasna

SAP, Palo Alto(USA)