G''Day Folks,
Just a preview of the next script for the DTraceToolkit.
There is script I saw called app_crash.d by Greg Nakhimovsky & Morgan
Herrington, which caught application crashes and then runs a su''d
script
to gather app info.
Nice idea. Although I wanted to see how much could be done in pure DTrace,
without needing a su''d script.
Below is where I''m at, all the info comes straight from DTrace (the
ancestory list is fairly weird as it''s actually backwards :).
It''s called
crap.d after Crashed Aplications.
Brendan
[Sydney, Australia]
# ./crap.d
Waiting for crashing applications...
-----------------------------------------------------
CRASH DETECTED at 2005 May 30 19:41:34
-----------------------------------------------------
Type: SIGSEGV
Program: procmail
Args: procmail -m
PID: 2877
TID: 1
LWPs: 1
PPID: 1778
UID: 100
GID: 1
TaskID: 76
ProjID: 3
PoolID: 0
ZoneID: 0
zone: global
CWD: /usr/include/sys
errno: 0
User Stack Backtrace,
procmail`sendcomsat+0x24
procmail`Terminate+0x76
procmail`0x805a2b0
procmail`0x805a40f
libc.so.1`__sighndlr+0xf
libc.so.1`call_user_handler+0x22b
libc.so.1`sigacthandler+0xbb
0xffffffff
procmail`rread+0x1d
procmail`0x805bcb4
procmail`read2blk+0x6b
procmail`readdyn+0x1f
procmail`readmail+0x181
procmail`main+0x532
procmail`_start+0x5d
Kernel Stack Backtrace,
genunix`sigaddqa+0x3f
genunix`trapsig+0xdb
unix`trap+0xc2b
unix`_cmntrap+0x83
Ansestors,
2877 procmail -m
1778 bash
1777 xterm -bg black -fg grey70 -sl 500 -vb
1 /sbin/init
0 sched
Times,
User: 0 ticks
Sys: 1 ticks
Elapsed: 3307 ms
Sizes,
Heap: 16388 bytes
Stack: 8192 bytes