diff options
Diffstat (limited to 'runtime/probes/agg')
-rw-r--r-- | runtime/probes/agg/count1.c | 14 | ||||
-rw-r--r-- | runtime/probes/agg/count2.c | 16 | ||||
-rw-r--r-- | runtime/probes/agg/stat1.c | 16 | ||||
-rwxr-xr-x | runtime/probes/agg/stp | 15 |
4 files changed, 11 insertions, 50 deletions
diff --git a/runtime/probes/agg/count1.c b/runtime/probes/agg/count1.c index 870dc32e..4b0ba1bf 100644 --- a/runtime/probes/agg/count1.c +++ b/runtime/probes/agg/count1.c @@ -70,23 +70,11 @@ static struct kprobe stp_probes[] = { #define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct kprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) { - printk("init: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { - printk("init: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; opens = _stp_counter_init(); reads = _stp_counter_init(); diff --git a/runtime/probes/agg/count2.c b/runtime/probes/agg/count2.c index ab13f5af..ea75f4bd 100644 --- a/runtime/probes/agg/count2.c +++ b/runtime/probes/agg/count2.c @@ -5,7 +5,7 @@ #include "counter.c" #include "probes.c" -MODULE_DESCRIPTION("SystemTap probe: count1"); +MODULE_DESCRIPTION("SystemTap probe: count2"); MODULE_AUTHOR("Martin Hunt <hunt@redhat.com>"); Counter opens; @@ -54,23 +54,11 @@ static struct jprobe stp_probes[] = { #define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct jprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) { - printk("init: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { - printk("init: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; opens = _stp_counter_init(); reads = _stp_counter_init(); diff --git a/runtime/probes/agg/stat1.c b/runtime/probes/agg/stat1.c index 1d3cb3b0..54e22db5 100644 --- a/runtime/probes/agg/stat1.c +++ b/runtime/probes/agg/stat1.c @@ -5,7 +5,7 @@ #include "counter.c" #include "probes.c" -MODULE_DESCRIPTION("SystemTap probe: count1"); +MODULE_DESCRIPTION("SystemTap probe: stat1"); MODULE_AUTHOR("Martin Hunt <hunt@redhat.com>"); @@ -51,23 +51,11 @@ static struct jprobe stp_probes[] = { #define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct jprobe)) -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - int init_module(void) { int ret; - if (!pid) { - printk("init: Can't start without daemon pid\n"); - return -1; - } - - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { - printk("init: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; opens = _stp_counter_init(); reads = _stp_stat_init(HIST_LOG,24); diff --git a/runtime/probes/agg/stp b/runtime/probes/agg/stp index 185a5905..4baf70ff 100755 --- a/runtime/probes/agg/stp +++ b/runtime/probes/agg/stp @@ -32,14 +32,11 @@ fi #/sbin/insmod $modulename -# print to screen only, 4 8K buffers -#../../stpd/stpd -p -b 8192 -n 4 +# print to screen only +#../../stpd/stpd -p $modulename -# print to screen and log to files, 4 8K buffers -../../stpd/stpd -b 8192 -n 4 $modulename +# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module) +../../stpd/stpd $modulename -# no screen or log -#../../stpd/stpd -q -b 8192 -n 4 - -# stpd will remove module when it exits -#/sbin/rmmod $modulename +# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module) +#../../stpd/stpd -q $modulename |