[strace/strace] tracing all children of an already started program. (#193)

Masatake YAMATO yamato at redhat.com
Mon Nov 29 22:10:12 UTC 2021

> I personally use this:
> strace -p "$(cat
> /sys/fs/cgroup/system.slice/httpd.service/{cgroup.procs,tasks})"
> Works for both cgroup versions.

I wonder how useful if we have following option(s):

  strace --cgroup=system.slice/httpd.service


  strace --systemd-unit=httpd.service


> On 11/24/21 09:34, Masatake YAMATO via Strace-devel wrote:
>>     Yep.. I was just saying it would be a nice feature to have in the
>>     same program without using external ones.
>> I agree with you if more than one program, pstree, pidof, grep and/or
>> sed are needed.
>> However, I think just one, pgrep (or pidof) is acceptable.
>> If strace introduces an option implementing the feature requested
>> here, the user must remember the option to enable the feature.
>> |[tab]| key with a modern shell may help us but remembering the command
>> |fragment, |-p "$(...)"| is not hard for me.
>> I was directly taught this fragment by @ldv-alt
>> <https://github.com/ldv-alt>, the maintainer of strace!
>> https://lists.strace.io/pipermail/strace-devel/2018-March/007950.html
>> https://lists.strace.io/pipermail/strace-devel/2018-March/007951.html
>> The lesson was not free. I had to submit a patch to procps-ng as fee.
>> https://gitlab.com/procps-ng/procps/-/merge_requests/58
>>>> You are receiving this because you are subscribed to this thread.
>> Reply to this email directly, view it on GitHub
>> <https://github.com/strace/strace/issues/193#issuecomment-977648655>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AOVBTR3SFUBKDHKP6Y65623UNSPSXANCNFSM5DM7G7EA>.
>> Triage notifications on the go with GitHub Mobile for iOS
>> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
>> or Android
>> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.

More information about the Strace-devel mailing list