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: Mon, 19 Mar 2012 14:53:40 -0400
- Subject: Re: can systemtap send signal back to an application its monitoring? please help
- References: <CAH=sm+a7enmbdqPYtWJk7=qmBuDpr1VWi2OrgfETGZ6Kw8w=RA@mail.gmail.com> <20120317202951.GB6859@redhat.com> <CAH=sm+YoS-O7hKs2a9Tj4whu-=AwaMR=KhiUyqU91AXCfkObVQ@mail.gmail.com>
Hi -
On Sun, Mar 18, 2012 at 11:52:09AM -0600, Khadija Rasul wrote:
> [...]
> So I want Wget (a command prompt download manager) -which will start before
> systemtap starts- to wait for systemtap to get ready for probing and then
> start its download. So I have modified the code of wget by putting
> 'pause()' to make it wait for systemtap to start and then I need systemtap
> to let wget know urgently that it is ready for probing. I was thinking of
> putting 'kill(id of wget, SIGCONT)' in systemtap 'Probe Begin()' to resume
> wget so that wget can start downloading. After your suggestion, I tried
> this with embedded C code in guru mode but it does not work.
Try:
stap -e 'probe begin { system(sprintf("kill -CONT %d", target())) } /*...*/' \
-x WGET-PID
> [...]
> p.s.: Could you please send me the systemtap forum's e-mail id so that I
> can contact the forum directly next time.
See the cc: header.
- FChE