Q:

How to get total number of bytes/sectors/blocks written to disk since booting?

I'm considering and update from HDD to SSD. But since Flash cells can only sustain limited writes. I want to know how much data my computer write during normal operation. So I can determine how long lifetime I can expect from the SSD.
Is it possible to get (rough) numbers somehow?

A:

The first idea I found is the vmstat -d command.
It tells you the number of sectors written since booting.
fdisk -l will tell you the sector size.
By multiplying the two you can get the number of bytes touched.
It seems my computer does roughly 1 gigabytes worth of writing in two hours. By doing a quick calculation a 128G SSD with 3000 write cycles would last 90 years... Nothing to worry about.

A:

Look at this page http://linuxpoison.blogspot.com.au/2009/02/how-to-measure-and-read-disk-activity.html
# cat /sys/block/sda/stat

11836508  1974427 276764974 242202738 13703385 18793696 597760590 2010426698      135 76333414 2253542452

Field  3 -- # of sectors read
Field  7 -- # of sectors written

