aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorAlex Wilson <[email protected]>2014-10-31 17:25:24 +1000
committerAlex Wilson <[email protected]>2014-12-29 11:06:55 +1000
commit9a065ead487d1d655b8a73e84ee68e2c51ee21b0 (patch)
treec0363f341e102f3d7db4e5eebefe973b7d5e06f6 /erts/configure.in
parente2a09281ec8d60cd47f86caa59d41d3cd945d8bc (diff)
downloadotp-9a065ead487d1d655b8a73e84ee68e2c51ee21b0.tar.gz
otp-9a065ead487d1d655b8a73e84ee68e2c51ee21b0.tar.bz2
otp-9a065ead487d1d655b8a73e84ee68e2c51ee21b0.zip
os_mon: cpu_sup should use native sysctl/libkvm calls on BSD
This avoids forking off with os:cmd every time we just want to collect the load averages. riak does this every second, which results in a lot of unnecessary load.
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 1676d3d216..c41a5bec5a 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -4705,9 +4705,18 @@ AC_CHECK_LIB(kstat, kstat_open, [
CPU_SUP_LIBS="$CPU_SUP_LIBS -lkstat"
])
+AC_CHECK_LIB(kvm, kvm_open, [
+ os_mon_programs="$os_mon_programs cpu_sup"
+ CPU_SUP_LIBS="$CPU_SUP_LIBS -lkvm"
+ ])
+
case $host_os in
solaris2*)
os_mon_programs="$os_mon_programs ferrule mod_syslog" ;;
+ darwin*)
+ os_mon_programs="$os_mon_programs cpu_sup" ;;
+ openbsd*)
+ os_mon_programs="$os_mon_programs cpu_sup" ;;
linux*)
os_mon_programs="$os_mon_programs cpu_sup" ;;
esac