Julien Pivotto
68a6c78c0d
Update go to 1.17 ( #2159 )
...
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
3 years ago
Ben Kochie
839c2d557f
Update go-kstat location
...
Move go-kstat to the new github.com/illumos/go-kstat location.
Signed-off-by: Ben Kochie <superq@gmail.com>
3 years ago
Jon Davies
e766485286
Add kstat-based Solaris metrics ( #1197 )
...
* collector/loadavg_solaris.go: Use libkstat to gather load averages.
* go.mod: Added go-kstat.
* boot_time_solaris.go: Added.
* cpu_solaris.go: Added.
* README.md: Updated entries for Solaris.
* collector/zfs_solaris.go: Added.
* CHANGELOG.md: Added note about kstat-based Solaris metrics.
Signed-off-by: Jonathan Davies <jpds@protonmail.com>
6 years ago
Dan Fredell
c52e0d3353
Fix SmartOS build #1017 ( #1018 )
...
Signed-off-by: Dan Fredell <Dan.Fredell@gmail.com>
6 years ago
Tobias Schmidt
515b5a933d
Fix build tags of loadavg collector
...
The collector is only implemented for a subset of all operating systems
supported by go. Compilation will fail if attempted for another OS
target.
7 years ago
Karsten Weiss
b73af72853
Explicitly check for the rc 3 in call to getloadavg(). Reorder logic.
8 years ago
Karsten Weiss
af358ec800
golint fixes: if block ends with a return statement, so drop this else and outdent its block.
8 years ago
Kevin Pettijohn
d2fbeeb3c3
Added loadavg collector for solaris
...
It seems solaris prefers "sys/loadavg.h" over "stdlib.h" when
fetching the load average.
For Illumos based OSes it was required to include "sys/time.h" to
ensure that "hrtime_t" was defined.
https://www.illumos.org/issues/6002
It also required setting the ldflags "-fno-stack-protector -lssp" to
avoid undefined symbols when linking with gcc.
/opt/local/go/pkg/tool/solaris_amd64/link: running gcc failed: exit status 1
Undefined first referenced
symbol in file
__stack_chk_fail /tmp/go-link-138622936/000002.o
__stack_chk_guard /tmp/go-link-138622936/000002.o
8 years ago
Dominik Honnef
54c74923ee
Implement loadavg on FreeBSD without cgo
...
The code may also work for other BSDs, but I don't have access to those
for testing.
8 years ago
Nick Owens
2cb489253c
collector: support 1,5,15m load averages for all unices
9 years ago
Matthias Rampke
788ac9a859
Rearrange fixtures to match "real" proc and sys.
...
And add some missing fixtures for default collectors, even if they're
not read by tests yet.
9 years ago
Matthias Rampke
2d0d72b97d
Add license headers to all code files.
9 years ago
Siavash Safi
66e0171159
Rename linux collectors for build constraints.
9 years ago
Tobias Schmidt
974f6fc762
Fix tests
10 years ago