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

Error when run the code #52

Closed
darshanpandya86 opened this issue Nov 18, 2021 · 4 comments
Closed

Error when run the code #52

darshanpandya86 opened this issue Nov 18, 2021 · 4 comments

Comments

@darshanpandya86
Copy link

when I do go run i get below error

github.com/elastic/gosigar
/elastic/gosigar/concrete_sigar.go:20:11: cpuUsage.Get undefined (type Cpu has no field or method Get)

@klakin-pivotal
Copy link
Contributor

klakin-pivotal commented Nov 19, 2021

Based on the error message, it appears that you're running a fork of gosigar from here: https://github.com/elastic/gosigar.

Does this error occur when you use this version of gosigar, rather than the elastic fork?

If it does not, then (given that the elastic fork has commits that this repo does not have) you should report this issue over there.

@bosh-admin-bot
Copy link

This issue was marked as Stale because it has been open for 21 days without any activity. If no activity takes place in the coming 7 days it will automatically be close. To prevent this from happening remove the Stale label or comment below.

@klakin-pivotal
Copy link
Contributor

It has been three weeks since I've heard anything about this issue from you. Because I suspect that your issues are due to using a fork of the gosigar code that's missing something important, I'm going to close this Issue.

Feel free to reopen it with a more complete report if you disagree with my conclusion.

@chnrxn
Copy link

chnrxn commented Jun 8, 2022

The arm64 build seems to be broken.

$ go version
go version go1.18.3 darwin/amd64

$ GOARCH=arm64 go build -v ./...
github.com/cloudfoundry/gosigar
# github.com/cloudfoundry/gosigar
./concrete_sigar.go:20:12: cpuUsage.Get undefined (type Cpu has no field or method Get)
./concrete_sigar.go:30:14: cpuUsage.Get undefined (type Cpu has no field or method Get)
./concrete_sigar.go:49:11: l.Get undefined (type LoadAverage has no field or method Get)
./concrete_sigar.go:55:11: m.Get undefined (type Mem has no field or method Get)
./concrete_sigar.go:61:11: m.GetIgnoringCGroups undefined (type Mem has no field or method GetIgnoringCGroups)
./concrete_sigar.go:67:11: s.Get undefined (type Swap has no field or method Get)
./sigar_shared.go:12:21: procTime.Get undefined (type *ProcTime has no field or method Get)
$ git remote -v
origin	https://github.com/cloudfoundry/gosigar (fetch)
origin	https://github.com/cloudfoundry/gosigar (push)
commit 60d9d42767291e04ad2194263718f44040cf6d88 (HEAD -> master, tag: v1.3.4, origin/master, origin/HEAD)
Author: nicholaswang <wzhever@gmail.com>
Date:   Wed May 25 08:22:44 2022 +0800

    Free memory report now accurate in nested cgroups

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

No branches or pull requests

5 participants