文件系统-1-相关节点和命令
一、文件节点
1. /proc/partitions
/ # cat /proc/partitions major minor #blocks name 1 0 8192 ram0 ... 1 15 8192 ram15 254 0 10485760 vda ... 254 304 98304 vdt 253 0 6291456 zram0 252 0 5298756 dm-0 ... 252 5 324420 dm-5
创建位置 block/genhd.c。通过此文件可以获取系统磁盘的分区信息。每一行表示一个磁盘分区,内容分别为主设备号、次设备号、分区大小等信息。
2. /proc/diskstats
/ # cat /proc/diskstats 1 0 ram0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 120 loop15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 254 0 vda 32037 1846 3952896 23666 0 0 0 0 0 24444 1804 0 0 0 0 254 304 vdt 1 0 8 0 0 0 0 0 0 4 0 0 0 0 0 253 0 zram0 106238 0 849904 892 222795 0 1782360 2184 0 16936 3076 0 0 0 0 252 0 dm-0 31032 0 3624200 23924 0 0 0 0 0 23628 23924 0 0 0 0 252 5 dm-5 1704 0 203008 2312 0 0 0 0 0 2128 2312 0 0 0 0
创建位置 block/genhd.c
其它:
/sys/block/dm-0 # ls alignment_offset bdi capability dev discard_alignment dm ext_range holders inflight power queue range removable ro size slaves stat subsystem uevent /sys/block/dm-0 # ls dm/ name rq_based_seq_io_merge_deadline suspended use_blk_mq uuid /sys/block/dm-0 # ls queue add_random discard_max_bytes io_poll max_discard_segments max_segment_size nr_requests rotational write_cache chunk_sectors discard_max_hw_bytes io_poll_delay max_hw_sectors_kb max_segments optimal_io_size rq_affinity write_same_max_bytes dax discard_zeroes_data iostats max_integrity_segments minimum_io_size physical_block_size scheduler write_zeroes_max_bytes discard_granularity hw_sector_size logical_block_size max_sectors_kb nomerges read_ahead_kb wbt_lat_usec zoned
二、命令
1. df
/ # df Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 6941652 1644 6940008 1% /dev tmpfs 6941652 0 6941652 0% /mnt /dev/block/dm-5 324420 324420 0 100% /vendor /dev/block/persist 27632 204 27428 1% /mnt/vendor/persist /dev/block/bluetooth_a 65488 864 64624 2% /vendor/bt_firmware /dev/fuse 96464524 5509204 90955320 6% /mnt/user/10/emulated ...
posted on 2024-05-22 18:41 Hello-World3 阅读(39) 评论(0) 编辑 收藏 举报