8

How can I get iostats io throughput of just a process to try know if this process starts burning my HDD.

Thanks!

enedebe
  • 1,066
  • 3
  • 11
  • 18

4 Answers4

8

Assuming a recent version of Linux, I'd look at the iotop utility.

You don't mention your distribution of Linux, but the tool is available for most in the default package repositories.

ewwhite
  • 197,159
  • 92
  • 443
  • 809
2

Some useful tools:

  • iotop
  • htop (as instructed by B14D3)
  • btrace

... and if you ever need to see per-process network usage, try nethogs.

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
2

You can get the I/O data from /proc/[pid]/io file (or simply /proc/self/io for the current process). I/O performed in subprocesses is inherited as those terminate, so reading the line "write_bytes" before and after your task should give a reasonable estimate. However, this doesn't take different devices into account.

1

Htop can display io stats per process. You have to only setup to display propper colums by pressing f2 and add io_rate io_write_reate and io_read_rate from menu Setup>Columns

You can use iotop.

B14D3
  • 5,188
  • 15
  • 64
  • 83