I'm trying to monitor the number of disk reads and writes on my VPS (Rackspace in this case) running Ubuntu 9.04. I realize there are many tools to do this, but when using dstat 0.7 I tried the following command:

dstat -d

The output is just two columns of zeroes even when I upload a large file via scp that should be causing a large number of disk writes. Why is this, and how do I get dstat to correctly display the number of disk reads and writes?

link|improve this question
Have you tried running sync after the upload? – Cristian Ciupitu Mar 2 '11 at 6:57
Thanks for the suggestion. It appears not to make a difference. – Jonathan Berger Mar 3 '11 at 0:33
feedback

1 Answer

up vote 0 down vote accepted

dstat don't work in OpenVZ container. If you have access to host node, run:

# cat /proc/bc/556/ioacct 
read                           95322968064
write                        5023383080960
dirty                        5023383703552
cancel                       4862043058176
missed                                   0
syncs_total                             20
fsyncs_total                       1145489
fdatasyncs_total                   5842564
range_syncs_total                        0
syncs_active                             0
fsyncs_active                            0
fdatasyncs_active                        0
range_syncs_active                       0
vfs_reads                       7187138835
vfs_read_chars              56901570399853
vfs_writes                       777479552
vfs_write_chars              5636033128166
io_pbs                                 152
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.