Advertisement
devinteske

fstype_open.bt

Feb 12th, 2020
528
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #!/usr/bin/bpftrace
  2. #include <linux/fs.h>
  3. #include <linux/mount.h>
  4. kprobe:vfs_open {
  5. $path = (struct path *)arg0;
  6. $mnt = (struct vfsmount *)$path->mnt;
  7. $mnt_sb = (struct super_block *)$mnt->mnt_sb;
  8. $type = (struct file_system_type *)$mnt_sb->s_type;
  9. $fstype = $type->name;
  10. @open[str($type->name)] = count();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement