I'm in the process of working on a script to identify IO usage on a
high IO server I have setup (Debian Etch). My question is how can
identify specific processes that are using much of these resources, I
can identify the processes using IOTOP, but doing it remotely via
script can be a pain since I have to grep and awk through the entire
content in real time.
I also can look at the open file handles via:
lsof | awk '{print $2}' | sort | uniq -c | sort -k1 -g
But that doesn't give sound enough proof as I'm looking for an abusive
user not specifically something that has X amount of file handles
open.
Does anyone have to identify specific processes that are either
writing or reading excessively?
On GNU/Linux, I'm aware of pidstat, which is part of the sysstat package on Gentoo.
pidstat gives detailed per-process information about CPU and I/O usage, but it a 2.6.20 or higher kernel is needed for disk I/O information (says the man pidstat page).
sysstat seems to be supported by Debian Etch too.
<http://packages.debian.org/etch/sysstat>
But, I don't see pidstat in this package.
<http://packages.debian.org/etch/i386/sysstat/filelist>
Moreover, I fear that Debian etch is based on an older kernel (maybe 2.6.18).
If you've a recent kernel (>= 2.6.20), you may want to compile sysstat from the sources:
<http://freshmeat.net/projects/sysstat/>
I hope it helps.
--
André Gillibert.