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
This commit is contained in:
parent
f9d3f830cb
commit
d2fbeeb3c3
2 changed files with 41 additions and 1 deletions
|
|
@ -11,7 +11,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build darwin dragonfly netbsd openbsd solaris
|
||||
// +build darwin dragonfly netbsd openbsd
|
||||
// +build !noloadavg
|
||||
|
||||
package collector
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue