51

Is there a Linux command to monitor read and writes over a period of time? with what files were accessed and how much data was written.

top 6 comments
sorted by: hot top controversial new old
[-] Flanhare@lemmy.world 16 points 1 year ago

iotop maybe?

[-] lemann@lemmy.one 13 points 1 year ago

Iotop, lsof

They won't do exactly what you want but will get you partway there

[-] thelastknowngod@lemm.ee 5 points 1 year ago

For read/write ops or disk usage over time, I would usually use a monitoring system like Prometheus and Grafana.

When you start talking about what specific files are accessed and when, that's usually up to an intrusion detection system (or IDS). I don't have good recommendations for that unfortunately.

[-] d3Xt3r@lemmy.world 5 points 1 year ago* (last edited 1 year ago)

sysdig can monitor and display file IO usage.

See this page for some examples: https://github.com/draios/sysdig/wiki/Sysdig%20Examples#disk-io

[-] lnxtx@feddit.nl 4 points 1 year ago

inotify-tools:

inotifywait -r -m desired/directory
[-] ono@lemmy.ca 4 points 1 year ago* (last edited 1 year ago)

Something like iotop -Pao (real-time) or iotop -obd (batch) ought to do the job. I don't know if it includes writes to non-physical devices like tmpfs.

Some other commands you might find interesting: iosnoop, fatrace, pidstat, blktrace.

this post was submitted on 27 Aug 2023
51 points (100.0% liked)

Linux

7777 readers
5 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 1 year ago
MODERATORS