ITEM: G0973L
How to use trace to look for signals
Question:
I have an application running on my RISC System/6000 that users access
while logged in from PC's over the network. For some reason, the
application seems to be getting killed, and the users are being
logged off. Is there any way I can find out if the application
process is being sent some signal which kills it?
Response:
Try the following
\< start the program that gets the error here if possible >
\# pstat -a > /tmp/pstat.out
\# /lib/ras/ras_smutil trace -a
\< reproduce the signal error now. you want to do this as quickly as
possible!! the longer it takes the harder it will be to resolve the
problem >
\# trcstop
\< the following command should be all on one line >
\# trcrpt -O'exec=y' -O'pid=y' -O'svc=y'
-d'119 11A 11C 11D' > /tmp/trace.out
Now look at the /tmp/pstat.out and find the program you ran which
receives the signal. You will need the hexadecimal number under the
PID column for it. You can grep for this number in the /tmp/trace.out
file to find out who sent the signal.
EXAMPLE
We want to start the program we expect to get the signal.
\# sleep 10000 &
[1] 19920
Now we need to get the hex PID of this process so we can look for it
later.
\# pstat -a > /tmp/pstat.out
Now lets start the trace
\# /lib/ras/ras_smutil trace -a
Reproduce the condition that causes the signal here. It is important
that this be done quickly after the last command.
\# kill -17 19920
[1] + 19920 Stopped (signal) sleep 10000 &
Stop the trace
\# trcstop
Generate the trace output, filtering out all events except the
signal-related events.
\# trcrpt -O'exec=y' -O'pid=y' -O'svc=y'
-d'119 11A 11C 11D' > /tmp/trace.out
Find the hex PID for the original process
\# grep sleep /tmp/pstat.out
77 s 4dd0 40cf 4dd0 0 0 64 0 059e4cd8 sleep
Look for this PID in the trace output.
\# grep -i 4dd0 /tmp/trace.out
119 ksh 16591 kill 9.733438080 11.185280 (cont. below)
\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^
who sent it
KERN_SENDSIGNAL hookdata 0000 00004DD0 00000011 (stuff deleted)
\^\^\^\^ \^\^\^\^
sleep's PID signal in hex (0x11 = 17)
Support Line: How to use trace to look for signals ITEM: G0973L
Dated: January 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:50
Comments or suggestions?
Contact us