This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 06.07.2016 18:42, Frank Ch. Eigler wrote:
> Alexander Lochmann <alexander.lochmann@tu-dortmund.de> writes:
>
>> [...]
>> I chose the letters randomly. For me, it doesn't matter. I just need an
>> argument to tell staprun to create a pid file. :)
>
> Would it be enough for staprun to have that pid option?
> That would mean the stap script would have to be compiled
> through to -p4 only, then staprun invoked manually.
>
Yes, that should do.
>> Yeah, sure. Since I run stap on Android, I have a background service,
>> which periodically checks if every single stap instance is still
>> running. Yes, it might be possible having more than one stap script
>> running. :) [...]
>
> Since your background service is already custom, maybe a custom shell
> script wrapper like this could serve your purposes without having to
> change staprun/stap at all:
>
> % cat pidwrapper
> #! /bin/sh
> pidfile="$1"; shift
> program="$1"; shift
> echo $$ > $pidfile
> exec $program ${1+$@} # exec to preserve $$ pid
>
> and then you invoke staprun via:
>
> % sh pidwrapper /path/to/this.pid staprun foo bar baz
>
>
That would be a nice workaround. I went through the source code. The
commandline option is used by stapio. Stapio creates the pidfile. If I
send a SIGKILL (or was it a SIGTERM? what so ever) to staprun, stap and
the module won't be shutdown properly. Hence, I have to send the signal
to stapio.
- Alex
> - FChE
>
--
Technische Universität Dortmund
Alexander Lochmann PGP key: 0xBC3EF6FD
Otto-Hahn-Str. 16 phone: +49.231.7556141
D-44227 Dortmund fax: +49.231.7556116
http://ess.cs.tu-dortmund.de/Staff/al
Attachment:
signature.asc
Description: OpenPGP digital signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |