1. 程式人生 > 實用技巧 >樹莓派檢視系統安裝時間與磁碟寫入量

樹莓派檢視系統安裝時間與磁碟寫入量

方法

使用dumpe2fs命令檢視指定分割槽的資訊

Filesystem created為安裝時間
Lifetime writes為磁碟分割槽建立以來的寫入量(≠總寫入量)

效果

pi@rpi0w:~ $ sudo dumpe2fs /dev/mmcblk0p2
dumpe2fs 1.44.5 (15-Dec-2018)
Filesystem volume name:   rootfs
Last mounted on:          /
Filesystem UUID:          8d008fde-f12a-47f7-8519-197ea707d3d4
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file dir_nlink extra_isize
Filesystem flags:         unsigned_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              453792
Block count:              1872896
Reserved block count:     78702
Free blocks:              1177063
Free inodes:              398854
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      114
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         7824
Inode blocks per group:   489
Flex block group size:    16
Filesystem created:       Wed Jul 10 08:20:54 2019
Last mount time:          Thu Jul 23 19:17:04 2020
Last write time:          Sun Apr 19 04:17:02 2020
Mount count:              88
Maximum mount count:      -1
Last checked:             Wed Jul 10 08:20:54 2019
Check interval:           0 (<none>)
Lifetime writes:          25 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:	          256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      70b8a693-a278-4e63-bd70-ab62ce77124a
Journal backup:           inode blocks
Journal features:         journal_incompat_revoke
Journal size:             32M
Journal length:           8192
Journal sequence:         0x001b2ed9
Journal start:            7917

注意

FAT32等無日誌檔案系統不支援檢視