diff options
Diffstat (limited to 'runtime/probes/test4')
-rwxr-xr-x | runtime/probes/test4/stp | 15 | ||||
-rw-r--r-- | runtime/probes/test4/test4.c | 12 |
2 files changed, 17 insertions, 10 deletions
diff --git a/runtime/probes/test4/stp b/runtime/probes/test4/stp index 185a5905..4baf70ff 100755 --- a/runtime/probes/test4/stp +++ b/runtime/probes/test4/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 diff --git a/runtime/probes/test4/test4.c b/runtime/probes/test4/test4.c index 9867d8ef..ac446bbb 100644 --- a/runtime/probes/test4/test4.c +++ b/runtime/probes/test4/test4.c @@ -1,7 +1,17 @@ #define STP_NETLINK_ONLY #define STP_NUM_STRINGS 1 + +static unsigned n_subbufs = 4; +static unsigned subbuf_size = 65536; + #include "runtime.h" +#ifdef STP_NETLINK_ONLY +static int transport_mode = STP_TRANSPORT_NETLINK; +#else +static int transport_mode = STP_TRANSPORT_RELAYFS; +#endif + #define NEED_INT64_VALS #define NEED_STAT_VALS @@ -71,7 +81,7 @@ int init_module(void) return -1; } - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { + if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) { printk("init: Couldn't open transport\n"); return -1; } |