-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
memory_bsd.go has a sysctl which isn't available in recent DragonflyBSD (not sure about previous one) #1127
Comments
Yeah.. good question. Unfortunately I don't use BSD and not sure about the best way forward. But yeah in general, if we need a different behavior in dragonfly than in freebsd, we'd need separate files with build flags to build only the right one. |
One of the possible solutions is to add a tiny logic to check the availability of data with |
That's good because it keeps them simple. On the other hand, keeping them together has a good point for Dragonfly users because they may stay updated thanks to many FreeBSD users. |
I think a simple check to use either swap_total or swap_size is probably fine.. But still, not using BSD and not knowing how dragonfly compares to freebsd I don't really have a opinion on that. |
Thank you for your advice. I think |
Signed-off-by: iori-yja <fivo.11235813@gmail.com>
* Change Dfly's CPU counting frequency, see: #1129 Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Convert Dfly's CPU unit into second Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Check BSD's mib which accounts for swap size; see #1127 Signed-off-by: iori-yja <fivo.11235813@gmail.com> * fix swap check code Signed-off-by: iori-yja <fivo.11235813@gmail.com>
This issue should be closed because it has merged! Thank you 🙏 🙏 |
Hey guys, I still see this error on FreeBSD 12.0-RELEASE.
Built from |
Should I open a new ticket, since it relates to FreeBSD? |
Interesting. So this was changed in FreeBSD too? Then I guess it needs a similar change.. Yeah probably best to open a new issue and refer to this one and #1149. |
* Change Dfly's CPU counting frequency, see: prometheus#1129 Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Convert Dfly's CPU unit into second Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Check BSD's mib which accounts for swap size; see prometheus#1127 Signed-off-by: iori-yja <fivo.11235813@gmail.com> * fix swap check code Signed-off-by: iori-yja <fivo.11235813@gmail.com>
* Change Dfly's CPU counting frequency, see: prometheus#1129 Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Convert Dfly's CPU unit into second Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Check BSD's mib which accounts for swap size; see prometheus#1127 Signed-off-by: iori-yja <fivo.11235813@gmail.com> * fix swap check code Signed-off-by: iori-yja <fivo.11235813@gmail.com>
Summary
This error shown below is due to
vm.swap_total
sysctl that isn't available in recent DragonflyBSD (I am not sure about prior one, but FreeBSD has). I have changed the code as following patch which makes it works:My question is that whether should I make PR to diverge Dfly's memory.go from
memory_bsd.go
. If this is applicable for other version of DragonflyBSD, I think it is worth to make them separate. If it is only seen in recent version of Dfly, I am not sure what to handle this difference. Please give me some hints to make a PR without regression.Host operating system: output of
uname -a
DragonFly tech-y09-dfly 5.3-DEVELOPMENT DragonFly v5.3.0.18494.gc70d4-DEVELOPMENT #1: Fri Aug 24 12:27:12 JST 2018 root@tech-y09-dfly:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64
node_exporter version: output of
node_exporter --version
Installed from source.
iori@tech-y09-dfly% git log | head -n 3
commit 7519967
Author: Ben Kochie superq@gmail.com
Date: Sat Oct 20 08:21:51 2018 +0200
iori@tech-y09-dfly% node_exporter --version
node_exporter, version (branch: , revision: )
build user:
build date:
go version: go1.10.3
node_exporter command line flags
node_exporter
(default)Are you running node_exporter in Docker?
No
What did you do that produced an error?
Wait for a couple of seconds.
What did you expect to see?
No errors
What did you see instead?
The text was updated successfully, but these errors were encountered: