LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-24-2020, 09:37 AM   #1
Shajirr
LQ Newbie
 
Registered: Feb 2020
Distribution: Manjaro KDE
Posts: 11

Rep: Reputation: Disabled
What program can show what processes write what files on which disk?


What program can show what processes write/read what files on which disk?

Basically need an equivalent of this - shows process name, PID, file name, read/write amount

iotop shows which processes, doesn't show which files or on which disk are being written/read.

KSysGuard - same story, doesn't show what is being read/written and where.

Last edited by Shajirr; 02-24-2020 at 09:57 AM.
 
Old 02-24-2020, 10:42 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Have a look at the lsof command.
 
1 members found this post helpful.
Old 02-29-2020, 10:54 PM   #3
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
An alternative to lsof would be the fuser command
 
Old 02-29-2020, 11:54 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Basically the problem is that *nix doesn't maintain those kind of stats anywhere. The I/O system is abstracted via the VFS so the kernel only gets pointers to buffers essentially.
It is possible to get that data with kernel traces, but they are not trivial to implement. Also the data are only valid from the time of the trace being initiated, not necessarily from the time any particular process started. And of course there is a limit to the kernel cache you can use.
 
Old 03-01-2020, 04:35 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Why do you need that? What do you want to achieve? lsof works. You can use for example htop/sar to see the load on a system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to enable a Hard Disk to read/write to a USB device but disable the USB device to read/write to the hard disk without user permission? ce309 Linux - General 33 05-22-2019 04:30 PM
How can external disk be mounted so a ordinary user can write to the disk Glenn D. Linux - Newbie 1 10-06-2012 02:32 AM
read/write,write/write lock with smbclient fails swatidas11 Linux - Networking 1 03-10-2010 12:27 PM
want to write a kernel module which creates 10 processes to access common varaible hrushi_kute Programming 7 09-27-2008 07:35 PM
How can I use "top" to show all of the processes preswang Linux - General 10 10-16-2003 02:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration