This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: can systemtap send signal back to an application its monitoring? please help
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Khadija Rasul <khadija dot rsl at gmail dot com>
- Cc: systemtap at sourceware dot org
- Date: Sat, 17 Mar 2012 16:29:51 -0400
- Subject: Re: can systemtap send signal back to an application its monitoring? please help
- References: <CAH=sm+a7enmbdqPYtWJk7=qmBuDpr1VWi2OrgfETGZ6Kw8w=RA@mail.gmail.com>
Hi -
khadija.rsl wrote:
> I am a new user of Systemtap but for some reason I cannot access the
> forum though I get all the mails. [...]
It should let anyone post, if you use plain/text email.
> I am trying to monitor performance of network bound user application
> program (Eg. Wget) performance at kernel using systemtap .While monitoring
> Is it possible for systemtap to send 'signal' back to wget? [...]
We don't have a ready-made tapset function for this. It's not quite
trivial since if we try:
function send_sig (sig:long) %{
send_sig (THIS->sig, current, 1);
%}
we'd find that send_sig involves taking task->sighand->siglock, which
is not allowed from most of our probe contexts. The way we'd probably
have to do this is with a formal deferred-work-queue, which involves
somewhat more machinery. I opened http://sourceware.org/PR13864 about
this so we don't forget.
In the mean time, if immediate delivery of the signal is not
essential, you could try plopping
system(sprintf("/bin/kill -%d %d", signum, pid))
into your script. This incurs some latency as a round-trip to
userspace is involved.
- FChE