summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2009-06-11 13:19:24 -0400
committerSteve Dickson <steved@redhat.com>2009-06-11 13:19:24 -0400
commite1c9b2542a4a7e72c7f3a876db09986d43f8c252 (patch)
treebb251bd4d7d9916fb8c1e968b44753bb0aa2ef39
parentdfdce363041b4fb72910837174bf40019923c9bc (diff)
downloadsystemtap-e1c9b2542a4a7e72c7f3a876db09986d43f8c252.tar.gz
systemtap-e1c9b2542a4a7e72c7f3a876db09986d43f8c252.tar.xz
systemtap-e1c9b2542a4a7e72c7f3a876db09986d43f8c252.zip
Added nfs/nfs_mount.stp
-rw-r--r--nfs/nfs_mount.stp (renamed from nfs/nfs_get_sb.stp)4
-rw-r--r--tapset/fs_type.stp16
-rw-r--r--tapset/nfs_mnt_rq.stp30
3 files changed, 48 insertions, 2 deletions
diff --git a/nfs/nfs_get_sb.stp b/nfs/nfs_mount.stp
index fed1c8e..0eee85b 100644
--- a/nfs/nfs_get_sb.stp
+++ b/nfs/nfs_mount.stp
@@ -6,5 +6,5 @@ probe module("nfs").function("nfs_get_sb")
printf(" : flags %s\n", nfs_mntflags($raw_data));
}
-probe begin { log("starting probe") }
-probe end { log("ending probe") }
+probe begin { log("starting nfs_mount probe") }
+probe end { log("ending nfs_mount probe") }
diff --git a/tapset/fs_type.stp b/tapset/fs_type.stp
new file mode 100644
index 0000000..a71bfd7
--- /dev/null
+++ b/tapset/fs_type.stp
@@ -0,0 +1,16 @@
+%{
+#include <linux/fs.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+#include <linux/path.h>
+#endif
+%}
+
+function fs_name:string(_fs:long)
+%{
+ struct file_system_type *fs =
+ (struct file_system_type *)(long) kread(&(THIS->_fs));
+
+ snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", fs->name);
+
+ CATCH_DEREF_FAULT();
+%}
diff --git a/tapset/nfs_mnt_rq.stp b/tapset/nfs_mnt_rq.stp
new file mode 100644
index 0000000..4f638a8
--- /dev/null
+++ b/tapset/nfs_mnt_rq.stp
@@ -0,0 +1,30 @@
+%{
+#include <linux/socket.h>
+#include <net/sock.h>
+#include <net/inet_sock.h>
+#include <linux/nfs.h>
+
+struct nfs_mount_request {
+ struct sockaddr *sap;
+ size_t salen;
+ char *hostname;
+ char *dirpath;
+ u32 version;
+ unsigned short protocol;
+ struct nfs_fh *fh;
+ int noresvport;
+};
+
+%}
+function mnt_req:string(_req:long)
+%{
+ struct nfs_mount_request *req =
+ (struct nfs_mount_request *)(long) kread(&(THIS->_req));
+
+ snprintf(THIS->__retvalue, MAXSTRINGLEN,
+ "server: %s export: %s vers: %d proto: %d",
+ req->hostname, req->dirpath, req->version, req->protocol);
+
+ CATCH_DEREF_FAULT();
+%}
+