NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to see disk I/O per process in NetBSD?





On 27.11.2020 13:45, Bartosz Maciejewski wrote:
Hello, I will repost what I've wrote on reddits r/netbsd as there are
no replys there, maybe here I will have more luck :)


Is there any way to see which process is doing read and writes on file
system? I know iostat, but it showin summary. For example, below xbd0
which is mount point of / have some huge writes of 12 MB/s. I can't
tackle it down to single process.

|tty xbd0 xbd1 xbd2 xbd3 xbd4 xbd5 CPU tin tout KB/t t/s MB/s KB/t t/s
MB/s KB/t t/s MB/s KB/t t/s MB/s KB/t t/s MB/s KB/t t/s MB/s us ni sy
in id 0 0 26.58 479 12.42 25.29 5 0.123 17.77 13 0.226 12.45 11 0.136
25.64 12 0.300 13.25 45 0.581 8 0 11 0 81 |

I need something similiar to iotop from Linux, or sorting option 'm'
from FreeBSD ( top -m io -o total)


Check 'man systat' for general overview, 'man fstat' for getting to
know what processes are using that file/mount or for display of open
files by that process.

And for details use dtrace or start with included program once you
identify with fstat name of the program then eg. like this:

sudo opensnoop -n date                                                 x
UID PID COMM FD PATH x 1000 1362 date 0 /etc/ld.so.conf x 1000 1362 date 3 /lib/libutil.so.7 x 1000 1362 date 3 /lib/libc.so.12 x 1000 1362 date 3 /etc/localtime x 1000 1362 date 3 /usr/share/zoneinfo/posixrules x ^C x x

In general things from here http://dlc.openindiana.org/docs/osol/20090715/DYNMCTRCGGD/html/chp-intro.html
works fine




Even glances doesn't show proper I/O - everything is 0/0


Home | Main Index | Thread Index | Old Index