Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
susu200213
V2EX  ›  Linux

想问一下在 Linux 下我该如何监听在接下来的一段时间内系统的文件写入情况

  •  
  •   susu200213 · May 19, 2023 · 1864 views
    This topic created in 1139 days ago, the information mentioned may be changed or developed.
    7 replies    2023-05-20 17:07:14 +08:00
    tensorzhang
        1
    tensorzhang  
       May 19, 2023
    watchdog ?
    aloxaf
        2
    aloxaf  
       May 19, 2023
    fanotify ?
    garychenlin
        3
    garychenlin  
       May 19, 2023
    audit ?
    defunct9
        4
    defunct9  
       May 19, 2023
    go 写个 inotify
    barathrum
        5
    barathrum  
       May 19, 2023
    systemtap 或 eBPF 之类的应该能做吧
    LindsayZhou
        6
    LindsayZhou  
       May 19, 2023   ❤️ 1
    搜了一下,bcc 的示例里已经有相关的了: https://github.com/iovisor/bcc/blob/master/tools/filetop.py

    ebpf + kprobe ,要定制化自己简单改下就行了。
    julyclyde
        7
    julyclyde  
       May 20, 2023
    进程视角:strace
    文件被动视角:inotify
    开放视角:systemtap 、eBPF 之类的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3687 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 10:29 · PVG 18:29 · LAX 03:29 · JFK 06:29
    ♥ Do have faith in what you're doing.