Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disk current read/write datas #8

Open
mertssmnoglu opened this issue Oct 28, 2024 · 0 comments
Open

Disk current read/write datas #8

mertssmnoglu opened this issue Oct 28, 2024 · 0 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@mertssmnoglu
Copy link
Collaborator

We need to get disk current read/write datas.

How can we do it?

shirou/gopsutil package provides disk.IOCounters function.

import(
    "github.com/shirou/gopsutil/v4/disk"
)

diskIOCounts, diskIOCountErr := disk.IOCounters()
if diskIOCountErr != nil {
	return nil, diskIOCountErr
}

for a, i := range diskIOCounts {
	fmt.Println(a)
	fmt.Println(i)
}

! I don't know which data we is the correct one.
Some of them:

  • ReadCount
  • MergedReadCount
  • WriteCount
  • MergedWriteCount
  • ReadBytes
  • WriteBytes
  • ...
@mertssmnoglu mertssmnoglu added the help wanted Extra attention is needed label Oct 28, 2024
@mertssmnoglu mertssmnoglu self-assigned this Oct 28, 2024
@gorkem-bwl gorkem-bwl added the good first issue Good for newcomers label Oct 30, 2024
@mertssmnoglu mertssmnoglu added this to the v1.1 milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants