From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49679 invoked by alias); 31 Mar 2017 15:40:49 -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 49656 invoked by uid 89); 31 Mar 2017 15:40:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy= X-HELO: mail-vk0-f49.google.com Received: from mail-vk0-f49.google.com (HELO mail-vk0-f49.google.com) (209.85.213.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Mar 2017 15:40:47 +0000 Received: by mail-vk0-f49.google.com with SMTP id s68so95354102vke.3 for ; Fri, 31 Mar 2017 08:40:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xRxLJqpASSQRUj7baINob//bARBpsrxNA5LItF8YfYE=; b=Ae1nImta/Sg+LtjDL5MFxyTj+bnbDNz1VXXCPzgWRMInV7DUP3aSxl8CK5qv3iXNQZ e7gMC7YDmVPSfX6WA41ukK1oXfYIbObE+okdr5gQ7lwwxv3uVdd1/oO60mvW9XVpsE4+ iWCfTXxtPByflaBQM5MYZZhmGQBLxguZmIK251Y9G8Cassf+Dbd/rzdl3Lv3BP5h79nH OZSQLqGTMyqPV/RtnFi6RMyZHk/SjX0v9Lof+b/cSPJXAvywqWtm5Qj+ofXp7urDN6Im xzfP+adq3VUABfXEKTt56Lvhl6wq4JGat5AJh2EUu7JETe4aR/TQMAgGuQDDH8ovM8eC yl4g== X-Gm-Message-State: AFeK/H0rMnvyzvBM7x8kCI5GEnA5a6scsH4v57UcrCqOKw4w9WJke/+uEXueR2CsrZEQa6voLutHMiOnO5VwIiSt X-Received: by 10.159.54.162 with SMTP id p31mr1907672uap.67.1490974846729; Fri, 31 Mar 2017 08:40:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.16.68 with HTTP; Fri, 31 Mar 2017 08:40:46 -0700 (PDT) In-Reply-To: References: From: David Smith Date: Fri, 31 Mar 2017 15:40:00 -0000 Message-ID: Subject: Re: Is it ok to insert a module multiple times with staprun? To: Shiyao Ma Cc: systemtap@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-q1/txt/msg00187.txt.bz2 On Fri, Mar 31, 2017 at 9:50 AM, David Smith wrote: > On Thu, Mar 30, 2017 at 10:51 PM, Shiyao Ma 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)