5

I frequently use the sendsignal tool for WebSphere Application Server processes (server, launchClient, wsadmin, etc.) in order to generate heap dumps. However, sendsignal doesn't work on 64-bit machines. Does anyone know of an alternative for sending the ctrl-break to a remote process?

Update: Bengt points out that this is basically the same as the following question. So, I guess my question is: has anyone found a way around this limitation in the past two years?

Can I send a ctrl-C (SIGINT) to an application on Windows?

Community
  • 1
  • 1
Brett Kail
  • 33,593
  • 2
  • 85
  • 90
  • 2
    Check out this thread: http://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows – jontro May 25 '11 at 20:47
  • @Bengt Yes, I guess I'm asking if the situation has improved at all since then :-). – Brett Kail May 26 '11 at 00:49

2 Answers2

3

Why use a control break for the dumps why not use the commands that are provided precisely to do this kind of activity?

https://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tprf_generatingheapdumps.html

$AdminControl invoke $objectName generateHeapDump

This provides you with the required info and you get the dumps that you are after.

HTH

Manglu

Manglu
  • 10,744
  • 12
  • 44
  • 57
  • 1
    Thanks, but that only works on server processes (I've updated my question), and even then, it doesn't work if the server process is hung or overloaded to the point that it's not responding to JMX/SOAP. – Brett Kail May 26 '11 at 00:52
  • Is there a way to use any gnu ports of the unix utilities on Windows? If yes kill -3 would be able to help. I personally haven't tried this on a windows box but it is worth a try. – Manglu May 26 '11 at 03:35
  • At least Cygwin kill -3 does not produce the desired effect. – Brett Kail Jan 09 '12 at 17:06
1

http://www.latenighthacking.com/projects/2003/sendSignal/

Latest comments link to working x64 versions for windows 2003 and windows 2008 too:

(2013-9-26) : Both, the 32-bit and 64-bit EXE versions can be downloaded from the following link: https://github.com/walware/statet/tree/master/de.walware.statet.r.console.core/win32 -- GeorgeP (2014-3-7) : I built both 32-bit and 64-bit version with Ctrl-C, it's called SendSignalCtrlC.exe and you can download it at: https://dl.dropboxusercontent.com/u/49065779/sendsignalctrlc/x86/SendSignalCtrlC.exe https://dl.dropboxusercontent.com/u/49065779/sendsignalctrlc/x86_64/SendSignalCtrlC.exe -- Juraj Michalak

Vadzim
  • 24,954
  • 11
  • 143
  • 151
  • Thanks, I hadn't noticed that. Unfortunately, I wasn't able to get the code sample working (it didn't seem to have an effect on the remote process). Have you tried it yourself or have any tips? – Brett Kail Jan 09 '12 at 17:05
  • @BrettKail, there are several pretending to be working solutions at https://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows. See rogerdpack's [comment](https://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows#comment50066881_15281070) for example. But I've swiched to forcing java threaddumps to separate file with jstack: https://stackoverflow.com/questions/1197912/cant-debug-java-windows-services-with-jhat-jps-jstack/47723393#47723393. – Vadzim Dec 08 '17 at 23:11
  • Interesting, thanks for the comment. Unfortunately, actual ctrl-break is needed to get a javacore/heapdump/systemdump on IBM JVMs. (Also unfortunately, I no longer hack easy access to the various Windows+JVM environments I once had in order to investigate/validate the linked solutions.) – Brett Kail Dec 10 '17 at 17:26