This is a bit out of my league, but I was wondering if I could write a script that takes a PID as an argument, and tells me how many KB/sec of IO the mentioned PID is using.
- I don't know how to give an argument to a script
- I am not sure if the /proc/[PID]/io is actually showing me this info. Is the summation of 'read_bytes' + 'write_bytes' the KB of IO used?
- How can I update this value every second?