Skip to content

feat: support to get rotational of the disk. #2956

@zhucan

Description

@zhucan

		content, err := os.ReadFile(fmt.Sprintf("/sys/block/%s/queue/rotational", dev))
		if err != nil {
			level.Debug(c.logger).Log("msg", "Failed to get sys block device queue stats", "err", err)
		}
		rotational := strings.Replace(string(content), "\n", "", -1)
		i, err := strconv.Atoi(rotational)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions