The ext4 file system has a bunch of per-device /sys entries in /sys/fs/ext4/ that can be used to inspect and change ext4 tuning parameters. One of the read-only values available is lifetime_write_kbytes which shows the number of kilobytes of data written to the file system since it was created.
For example, to see how much data was written on an ext4 filesystem on /dev/sda5, one uses:
To see how much data in has been written in kilobytes since mount time, read session_write_kbytes, for example:
For a full description of all the tunables, consult Documentation/ABI/testing/sysfs-fs-ext4 in the Linux source. Read more