0

Now a days in one of the DBS, High write I/O is seen on the storage during a particular time everyday..Is it possible to find which process is doing this high write I/O..Any OS related commands to track where from these requests coming..other than iostat and top

4
  • 2
    Try iotop instead. Also, what OS are you using and is there a cronjob running at that particular time ?
    – schaiba
    Commented Jun 8, 2017 at 10:49
  • 2
    We need to know what OS you are using to give you a better answer
    – user34720
    Commented Jun 8, 2017 at 10:50
  • Try atop (which will also log activity, so you can look at the day's record at the end of the day). Commented Jun 8, 2017 at 10:53
  • iotop and then press o.
    – 13dimitar
    Commented Jun 8, 2017 at 11:00

1 Answer 1

2

I've tried htop in the past. That seems to track IO usage based on process.

There are apparently a lot of other options out there on Github as well such as glances and atop.

Alternative to iotop for non-root user without sudo privileges

It makes me wonder whether or not your particular situation is somewhat unique and may require some customisation (some people go so far as to advocate parsing raw statistics coming from proc). There are plenty of options out there including iodump (which is written Perl).

root@kanga:~# while true; do sleep 1; dmesg -c; done | perl iodump
^C# Caught SIGINT.
TASK                   PID      TOTAL       READ      WRITE      DIRTY DEVICES
firefox               4450       4538        251       4287          0 sda4, sda3
kjournald             2100        551          0        551          0 sda4
firefox              28452        185        185          0          0 sda4
kjournald              782         59          0         59          0 sda3
pdflush                 31         30          0         30          0 sda4, sda3
syslogd               2485          2          0          2          0 sda3
firefox              28414          2          2          0          0 sda4, sda3
firefox              28413          1          1          0          0 sda4
firefox              28410          1          1          0          0 sda4
firefox              28307          1          1          0          0 sda4
firefox              28451          1          1          0          0 sda4

https://www.xaprb.com/blog/2009/08/23/how-to-find-per-process-io-statistics-on-linux/

#!/bin/bash

hostname=`hostname -s`    
carbon_host=YOUR_CARBON_HOSTNAME_OR_IP
carbon_port=2003

pidstat -h -d 1 | grep --line-buffered -v '^$' | grep --line-buffered -v '^#' | grep --line-buffered -v '^Linux' | awk --assign=hostname=${hostname} '{ printf "servers.%s.pidstat.%s.read %s %s\nservers.%s.pidstat.%s.write %s %s\n", hostname, $6, $3, $1, hostname, $6, $4, $1 ; fflush(); }' > /dev/tcp/${carbon_host}/${carbon_port}

https://serverfault.com/questions/574708/report-per-process-io-stats-with-pidstat-or-sar

https://serverfault.com/questions/169676/howto-check-disk-i-o-utilisation-per-process

You must log in to answer this question.

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