Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/bpftrace
- #include <linux/fs.h>
- #include <linux/mount.h>
- kprobe:vfs_open {
- $path = (struct path *)arg0;
- $mnt = (struct vfsmount *)$path->mnt;
- $mnt_sb = (struct super_block *)$mnt->mnt_sb;
- $type = (struct file_system_type *)$mnt_sb->s_type;
- $fstype = $type->name;
- @open[str($type->name)] = count();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement