5

I want to check which process taking highest I/O. To be exact I want to check which process doing the highest write operation and how much.

I know there are some tools like iotop. But as I have to work without a sudo and a foreign environment with very limited privilege I want to know how can I achieve this with built-in tools like ps. I want something like the following which I use to find CPU/Memory usage,

$ps -eo pid,command,%cpu,%mem --sort=-%cpu

Update: After trying several ways I found that I can't read /proc/[pid]/io file due to lack of privillage so no way to get I/O without proper privilege I guess.

 $cd /proc/; for i in $(ls | egrep -o ^\[0-9\]*); do cat $i/io; done
 cat: 1/io: Permission denied
 cat: 10/io: Permission denied
 cat: 10284/io: Permission denied
 cat: 11/io: Permission denied
 cat: 1174/io: Permission denied
 cat: 12/io: Permission denied
 ........
1
  • I think it looks like to be impossible to do, but there is no cause for downvotes.... Commented Jan 9, 2018 at 20:31

1 Answer 1

1

The problem is that you do not have access to this information as ordinary user for other users' processes.

1
  • Hmm that makes sense. But if I can see their cpu/memory usage then why I can't see their i/o usage?
    – arif
    Commented Jan 9, 2018 at 20:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .