iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.36k stars 3.86k forks source link

tools/syncsnoop: Add more syscalls support #5064

Closed Rtoax closed 2 months ago

Rtoax commented 2 months ago

Add fsync(),fdatasync(),syncfs(),sync_file_range(),msync() syscalls to trace. For example:

$ sudo ./syncsnoop.py
TIME(s)            COMM             CALL
1173253.856512000  worker           fdatasync
1173260.193706000  sync             sync
1173261.478894000  syncfs           syncfs
1173264.231075000  fsync            fsync
1173264.297788000  fsync            fdatasync
1173284.063700000  worker           fdatasync
1173288.229822000  mkfs.ext4        fsync
1173304.818227000  worker           fdatasync
1173315.065319000  journal-offline  fsync