summaryrefslogtreecommitdiff
path: root/systemtap/src/ioriot.stp
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2018-03-30 11:04:11 +0100
committerPaul Buetow <pbuetow@mimecast.com>2018-03-30 11:04:11 +0100
commitf2c21d78cecc86390b2bc16e111f1424f0f76630 (patch)
tree1f5e5b653e606d9112ae62b8e1723daf33f83fce /systemtap/src/ioriot.stp
parenta812f0b58edd2f74edbdd03e07006dccf3d535d6 (diff)
add capture file version check
Diffstat (limited to 'systemtap/src/ioriot.stp')
-rw-r--r--systemtap/src/ioriot.stp14
1 files changed, 9 insertions, 5 deletions
diff --git a/systemtap/src/ioriot.stp b/systemtap/src/ioriot.stp
index 4029ebb..ee77263 100644
--- a/systemtap/src/ioriot.stp
+++ b/systemtap/src/ioriot.stp
@@ -71,6 +71,15 @@ function absolute_path (path) {
return task_dentry_path(tc, pwd_dentry, pwd_mnt) . "/" . path;
}
+# Stop probing after 1h (for safety)
+probe timer.s(3600) {
+ exit();
+}
+
+probe begin {
+ printf("#|capture_version=%d|\n", 2);
+}
+
probe syscall.open.return, syscall.openat.return {
if (execname() != "stapio") {
pathname = user_string(@entry($filename))
@@ -597,9 +606,4 @@ probe syscall.exit_group {
}
}
-# Stop probing after 1h (for safety)
-probe timer.s(3600) {
- exit();
-}
-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4