This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Is it ok to insert a module multiple times with staprun?
Hi,
Just checked the system() command is async, though.
but I got the picture here.
Thanks.
On Fri, Mar 31, 2017 at 11:40 PM, David Smith <dsmith@redhat.com> wrote:
> On Fri, Mar 31, 2017 at 9:50 AM, David Smith <dsmith@redhat.com> wrote:
>> On Thu, Mar 30, 2017 at 10:51 PM, Shiyao Ma <i@introo.me> wrote:
>
> OK, I had another sneaky thought here. You could use the system()
> function to copy the config file to the /proc file. I haven't had time
> to test this, but in theory something like this should work:
>
> ====
> global config_done
>
> probe procfs.write("config")
> {
> # process $value here
> config_done = 1
> }
>
> probe kernel.function("vfs_read") if (config_done)
> {
> # real processing here...
> }
>
> probe begin
> {
> system(sprintf("cat config > /proc/systemtap/%s/config", module_name()))
> }
> ====
>
> --
> David Smith
> dsmith@redhat.com
> Red Hat
> http://www.redhat.com
> 256.217.0141 (direct)
> 256.837.0057 (fax)