1Demonstrations of vfscount, the Linux eBPF/bcc version. 2 3 4This counts VFS calls during time, by tracing all kernel functions beginning 5with "vfs_", By defaults, the time is 99999999s 6# ./vfscount 7Tracing... Ctrl-C to end. 8^C 9ADDR FUNC COUNT 10ffffffff811f3c01 vfs_create 1 11ffffffff8120be71 vfs_getxattr 2 12ffffffff811f5f61 vfs_unlink 2 13ffffffff81236ca1 vfs_lock_file 6 14ffffffff81218fb1 vfs_fsync_range 6 15ffffffff811ecaf1 vfs_fstat 319 16ffffffff811e6f01 vfs_open 475 17ffffffff811ecb51 vfs_fstatat 488 18ffffffff811ecac1 vfs_getattr 704 19ffffffff811ec9f1 vfs_getattr_nosec 704 20ffffffff811e80a1 vfs_write 1764 21ffffffff811e7f71 vfs_read 2283 22 23Here we are using an output in 10 seconds, and printing 10 seconds summaries 24# ./vfscount 10 25Tracing... Ctrl-C to end. 26 27ADDR FUNC COUNT 28ffffffffa1283671 vfs_rename 1 29ffffffffa129f471 vfs_setxattr 1 30ffffffffa12831c1 vfs_mkdir 1 31ffffffffa1282a51 vfs_rmdir 10 32ffffffffa1283f31 vfs_unlink 28 33ffffffffa1273e61 vfs_writev 53 34ffffffffa12ae061 vfs_statfs 55 35ffffffffa129e971 vfs_getxattr 138 36ffffffffa1288561 vfs_readlink 157 37ffffffffa12d6311 vfs_lock_file 223 38ffffffffa1274da1 vfs_write 537 39ffffffffa12798f1 vfs_statx_fd 2337 40ffffffffa1279971 vfs_statx 3064 41ffffffffa1271ba1 vfs_open 4334 42ffffffffa12798b1 vfs_getattr 4823 43ffffffffa1279821 vfs_getattr_nosec 4823 44ffffffffa1274af1 vfs_read 9060 45 46 47This can be useful for workload characterization, to see what types of 48operations are in use. 49 50You can edit the script to customize what kernel functions are matched. 51 52Full usage: 53 54# ./vfsstat -h 55USAGE: ./vfsstat [time] 56