From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14596 invoked by alias); 6 Jul 2016 20:05:44 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 14584 invoked by uid 89); 6 Jul 2016 20:05:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,PDF_ATTACHED,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=06072016, 06.07.2016, H*i:sk:y0meg76, H*f:sk:y0meg76 X-HELO: unimail.uni-dortmund.de Received: from mx1.HRZ.tu-dortmund.de (HELO unimail.uni-dortmund.de) (129.217.128.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 06 Jul 2016 20:05:33 +0000 Received: from [192.168.178.104] (x5d83fa37.dyn.telefonica.de [93.131.250.55]) (authenticated bits=0) by unimail.uni-dortmund.de (8.16.0.16/8.16.0.16) with ESMTPSA id u66K5OB8020931 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 6 Jul 2016 22:05:24 +0200 (CEST) Subject: Re: SystemTap for Android - patchset To: "Frank Ch. Eigler" References: <56e0c7f4-d317-f76b-5156-3569a6097b62@tu-dortmund.de> <577CF9A2.7050008@tu-dortmund.de> Cc: Josh Stone , systemtap@sourceware.org From: Alexander Lochmann Message-ID: <577D6483.9050507@tu-dortmund.de> Date: Wed, 06 Jul 2016 20:05:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="geP2aHCgF3J5lRFSlxrsG4XOe7tSktIlo" X-IsSubscribed: yes X-SW-Source: 2016-q3/txt/msg00011.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --geP2aHCgF3J5lRFSlxrsG4XOe7tSktIlo Content-Type: multipart/mixed; boundary="KowHaXdCdPdfTOi87J8q98r3bXHpuQDVj" From: Alexander Lochmann To: "Frank Ch. Eigler" Cc: Josh Stone , systemtap@sourceware.org Message-ID: <577D6483.9050507@tu-dortmund.de> Subject: Re: SystemTap for Android - patchset References: <56e0c7f4-d317-f76b-5156-3569a6097b62@tu-dortmund.de> <577CF9A2.7050008@tu-dortmund.de> In-Reply-To: --KowHaXdCdPdfTOi87J8q98r3bXHpuQDVj Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Content-length: 1702 On 06.07.2016 18:42, Frank Ch. Eigler wrote: > Alexander Lochmann writes: >=20 >> [...] >> I chose the letters randomly. For me, it doesn't matter. I just need an >> argument to tell staprun to create a pid file. :) >=20 > 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. >=20 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. :) [...] >=20 > 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: >=20 > % cat pidwrapper > #! /bin/sh > pidfile=3D"$1"; shift > program=3D"$1"; shift > echo $$ > $pidfile > exec $program ${1+$@} # exec to preserve $$ pid >=20 > and then you invoke staprun via: >=20 > % sh pidwrapper /path/to/this.pid staprun foo bar baz >=20 >=20 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 >=20 --=20 Technische Universit=E4t 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 --KowHaXdCdPdfTOi87J8q98r3bXHpuQDVj-- --geP2aHCgF3J5lRFSlxrsG4XOe7tSktIlo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXfWSDAAoJEFk+7QW8Pvb9DbAP/1Om6xrzKLCMS1W0409U45EE LTOUcw6HMAj5LQ5o2f51GOvqARuvXR5fOzgGJFHmlDIPSuiXf3rYLvfua3uMXa9o k1RzujiofUO2QIU3byNxLwwQ/ti+GpHy23NlbJuW5RZp2h+0eAqBh95LKn4YyOXV dt0zEfOBKem7X23skRvYN/Z8yWCY/ZHsokJE7z72tQDQN3bfEuwcxYG+WfHL4dMO +9oDnyH//6Svsyout5ok1jH3Ll6bRoN9OcXJ0Q4+hpqPXxQ0GGFfIGC3U1P6iLO+ o5gy9SE5/7sHEyU3D4Fq61agXCI3p8uD8ilcYr+NPw26mG1RKe7iS0I+E4xgBDKP JCnsoTKRTFEy9Z6rn1iUMLzydpRorEQKyIK1Mh15nfxHulqBG7Lc5DWyxZzXXa3O 37KG3oglvXa/O/F2hpT7aiEmiImWktCmK4woYHcon+TS+KJGV5IOEK7rge1UcjxE u0yZ947xJZJ8SNqMsm/7548yZV70We4zUvarDY5dwIZo52hlBQELl+AK6a5LvjKR HraTI1h+4OpSt8sKksSQDRkDCcHjA5LmVeCE73kcCMk1hr8uXPS+fmMOsF0jgHXf D2U3i0HKhzAvLe7LNDyAT+A2KZRVRuvBcnStY7bgBn5DE7KmgtEyOo//xX8KcIN1 INEPVOil4KaG7ucLbcWu =p0aW -----END PGP SIGNATURE----- --geP2aHCgF3J5lRFSlxrsG4XOe7tSktIlo--