Andrea Cucciarre'
2010-06-21 07:49:00 UTC
Hello,
I have written the following dtrace script to trace who is killing an
application process:
#!/usr/sbin/dtrace -s
#pragma D option quiet
proc:::signal-send
/args[1]->pr_pid == $1/
{
printf("%20s %20s %12s %12s %12s\n", "SENDER", "RECIPIENT", "SEND PID",
"REC PID", "SIGNAL");
printf("%20s %20s %12d %12d %12d\n", execname,
stringof(args[1]->pr_fname), pid, args[1]->pr_pid, args[2]);
}
When I interrupt (Ctrl+C) the dtrace script the application process got
terminated and the following trace appears in the output of the dtrace
script:
***@hkctmd01 # /tmp/signal.d 18080
SENDER RECIPIENT SEND PID REC
PID SIGNAL
sched p_ctmag 0
18080 18
SENDER RECIPIENT SEND PID REC
PID SIGNAL
sched p_ctmag 0
18080 18
SENDER RECIPIENT SEND PID REC
PID SIGNAL
sched p_ctmag 0
18080 18
^C
SENDER RECIPIENT SEND PID REC
PID SIGNAL
sshd p_ctmag 24510
27861 2
Questions is:
- Why the application process got terminated when I kill the dtrace script:
- Why the dtrace script trace also signal sent to process 27861 even if
I have filtered for proc 18080?
Thanks in advance!
--
Oracle <http://www.oracle.com/>*
Andrea Cucciarre' - System engineer
*Systems Technology Service Centre
Solaris and Networking
Global Services Delivery
Phone: +39 0264152047
Email: andrea.cucciarre-QHcLZuEGTsvQT0dZR+***@public.gmane.org
I have written the following dtrace script to trace who is killing an
application process:
#!/usr/sbin/dtrace -s
#pragma D option quiet
proc:::signal-send
/args[1]->pr_pid == $1/
{
printf("%20s %20s %12s %12s %12s\n", "SENDER", "RECIPIENT", "SEND PID",
"REC PID", "SIGNAL");
printf("%20s %20s %12d %12d %12d\n", execname,
stringof(args[1]->pr_fname), pid, args[1]->pr_pid, args[2]);
}
When I interrupt (Ctrl+C) the dtrace script the application process got
terminated and the following trace appears in the output of the dtrace
script:
***@hkctmd01 # /tmp/signal.d 18080
SENDER RECIPIENT SEND PID REC
PID SIGNAL
sched p_ctmag 0
18080 18
SENDER RECIPIENT SEND PID REC
PID SIGNAL
sched p_ctmag 0
18080 18
SENDER RECIPIENT SEND PID REC
PID SIGNAL
sched p_ctmag 0
18080 18
^C
SENDER RECIPIENT SEND PID REC
PID SIGNAL
sshd p_ctmag 24510
27861 2
Questions is:
- Why the application process got terminated when I kill the dtrace script:
- Why the dtrace script trace also signal sent to process 27861 even if
I have filtered for proc 18080?
Thanks in advance!
--
Oracle <http://www.oracle.com/>*
Andrea Cucciarre' - System engineer
*Systems Technology Service Centre
Solaris and Networking
Global Services Delivery
Phone: +39 0264152047
Email: andrea.cucciarre-QHcLZuEGTsvQT0dZR+***@public.gmane.org