1

I'm writing a customized monitoring panel for Ubuntu server.

At this step i need to get real time hard disk read and write rate then put it into a file as a log file.

I used tools like Hdparm,Iotop but did not worked. I want result into a file.

I want some result like :

10Kb read - 2kb write - 2014-2-13 16:40:03

So i can run it as Crontab and monitor every I/O rate

2 Answers 2

1

You can get this information from /proc. See how the munin disk_* plugins do it.

1
iostat /dev/sda \
          | grep 'sda' | awk  '{if ($2) print $2}' \
          | awk -v var="$(date +"%Y-%m-%d %r")" '{print  $1"&",var";"}' 

You must log in to answer this question.

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