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

disklinux

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?

Best Answer

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.