ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

linux – / sys / block / sda1 / stat和/ sys / block / xvda1 / stat有什么区别?

2019-08-14 06:54:02  阅读:13  来源: 互联网

标签:linux amazon-ec2 sysfs



在我的本地机器上,我有/ sys / block / sda1 / stat.
在亚马逊机器上,我有/ sys / block / xvda1 / stat.

当我运行cat / sys / block / sda1 / stat或cat / sys / block / xvda1 / stat时,都会给出11个输出字段.

/ sys / block / sda1 / stat和/ sys / block / xvda1 / stat文件有什么区别?

解决方法:

/ sys目录通常是安装sysfs文件系统的位置,其中包含有关设备和其他内核信息的信息.

/ sys / block中的文件包含有关系统上块设备的信息.您的本地系统有一个名为sda的块设备,因此存在/ sys / block / sda.您的Amazon实例有一个名为xvda的设备,因此存在/ sys / block / xvda.

/ sys / block /< dev> / stat文件提供了有关块设备< dev>的状态的若干统计信息.它由一行文本组成,包含由空格分隔的11个十进制值:

Name            units         description
----            -----         -----------
read I/Os       requests      number of read I/Os processed
read merges     requests      number of read I/Os merged with in-queue I/O
read sectors    sectors       number of sectors read
read ticks      milliseconds  total wait time for read requests
write I/Os      requests      number of write I/Os processed
write merges    requests      number of write I/Os merged with in-queue I/O
write sectors   sectors       number of sectors written
write ticks     milliseconds  total wait time for write requests
in_flight       requests      number of I/Os currently in flight
io_ticks        milliseconds  total time this block device has been active
time_in_queue   milliseconds  total wait time for all requests

因此,每个块设备都有自己的统计文件,因此具有不同的值.
有关详细信息,请参见kernel docs.



标签:linux,amazon-ec2,sysfs

专注分享技术,共同学习,共同进步。

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有