Brendan Gregg | 48fbc3e | 2015-08-18 14:56:14 -0700 | [diff] [blame] | 1 | Demonstrations of vfscount, the Linux eBPF/bcc version. |
| 2 | |
| 3 | |
Brendan Gregg | 4cbdef7 | 2015-08-29 14:53:22 +1000 | [diff] [blame] | 4 | This counts VFS calls, by tracing all kernel functions beginning with "vfs_": |
Brendan Gregg | 48fbc3e | 2015-08-18 14:56:14 -0700 | [diff] [blame] | 5 | |
Alexei Starovoitov | bdf0773 | 2016-01-14 10:09:20 -0800 | [diff] [blame] | 6 | # ./vfscount |
Brendan Gregg | 48fbc3e | 2015-08-18 14:56:14 -0700 | [diff] [blame] | 7 | Tracing... Ctrl-C to end. |
| 8 | ^C |
Brendan Gregg | 4cbdef7 | 2015-08-29 14:53:22 +1000 | [diff] [blame] | 9 | ADDR FUNC COUNT |
| 10 | ffffffff811f3c01 vfs_create 1 |
| 11 | ffffffff8120be71 vfs_getxattr 2 |
| 12 | ffffffff811f5f61 vfs_unlink 2 |
| 13 | ffffffff81236ca1 vfs_lock_file 6 |
| 14 | ffffffff81218fb1 vfs_fsync_range 6 |
| 15 | ffffffff811ecaf1 vfs_fstat 319 |
| 16 | ffffffff811e6f01 vfs_open 475 |
| 17 | ffffffff811ecb51 vfs_fstatat 488 |
| 18 | ffffffff811ecac1 vfs_getattr 704 |
| 19 | ffffffff811ec9f1 vfs_getattr_nosec 704 |
| 20 | ffffffff811e80a1 vfs_write 1764 |
| 21 | ffffffff811e7f71 vfs_read 2283 |
Brendan Gregg | 48fbc3e | 2015-08-18 14:56:14 -0700 | [diff] [blame] | 22 | |
| 23 | This can be useful for workload characterization, to see what types of |
| 24 | operations are in use. |
Brendan Gregg | 4cbdef7 | 2015-08-29 14:53:22 +1000 | [diff] [blame] | 25 | |
| 26 | You can edit the script to customize what kernel functions are matched. |