This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
psig for Linux
- From: Eugene Teo <eugeneteo at kernel dot sg>
- To: systemtap at sources dot redhat dot com
- Date: Mon, 14 Jan 2008 11:15:27 +0800
- Subject: psig for Linux
- Reply-to: Eugene Teo <eugeneteo at kernel dot sg>
Hi,
psig is a Solaris proc utility for listing the signal actions and
handlers of a process. Anyone who uses Linux would know that there is no
equivalent tool in Linux, and getting information related to the process
signals' disposition is not trivial, so I decided to write one using
SystemTap.
The version of psig I wrote looks very much like the Solarisâ psig tool
but it is not a port. It was written based on the example output of
http://developers.sun.com/solaris/articles/solaris_linux_app.html,
and it is licensed GPL.
Here is how it looks like when I run the script:
$ psig $$ | egrep ":|^HUP|^SEGV|^BUS"
5981: bash
HUP caught 0x0808d040 0 HUP,INT,ILL,TRAP,ABRT,BUS,FPE,USR1,SEGV,
USR2,PIPE,ALRM,TERM,XCPU,XFSZ,VTALRM,SYS
BUS caught 0x0808d040 0 HUP,INT,ILL,TRAP,ABRT,BUS,FPE,USR1,SEGV,
USR2,PIPE,ALRM,TERM,XCPU,XFSZ,VTALRM,SYS
SEGV caught 0x0808d040 0 HUP,INT,ILL,TRAP,ABRT,BUS,FPE,USR1,SEGV,
USR2,PIPE,ALRM,TERM,XCPU,XFSZ,VTALRM,SYS
For more information, take a look at:
http://sources.redhat.com/systemtap/wiki/WSPsig
It requires a patch to tapset/signal.stp. You can refer to my email I
sent just now: [PATCH] Added new functions in tapset/signal.stp or
download it here: http://www.kernel.sg/scripts/psig/.
Enjoy!
Thanks,
Eugene