Skip to content

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

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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