No, not by default. There is such a thing as too much logging (especially when you start risking logging the action of writing a log entry…).
BSD process accounting (if you have it, run lastcomm
), if active, records the name of every command that is executed and some basic statistics, but not the arguments.
The audit subsystem is more general and more flexible. Install the audit
package and read the SuSE audit guide (mostly the part about rules), or try
auditctl -A exit,always -F path=/usr/bin/java -S execve
Or: instead of killing it, kill -STOP
it. The STOP suspends the process, no questions asked. You get the option to resume (kill -CONT
) or terminate (kill -KILL
) later. As long as the process is still around, you can inspect its command line (/proc/12345/cmdline
), its memory map (/proc/12345/maps
) and so on.
Or: attach a debugger to the process and pause it. It's as simple as gdb --pid 12345
(there may be better options for a Java process); attaching a debugger immediately pauses the process (if you exit the debugger, the process receives a SIGCONT and resumes).
Note that all this only catches OS-level processes, not JVM threads. You need to turn to JVM features to debug threads.
SIGSTOP
to pause it instead? – jw013 Nov 23 '11 at 21:51