Skip to content

Commit

Permalink
Don't check cpu util on Alpine that uses libc-musl
Browse files Browse the repository at this point in the history
  • Loading branch information
turtled committed Sep 16, 2019
1 parent 31671f5 commit 9cdaa71
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/emqx_os_mon.erl
Expand Up @@ -166,4 +166,7 @@ call(Req) ->
gen_server:call(?OS_MON, Req, infinity).

ensure_check_timer(State = #{cpu_check_interval := Interval}) ->
State#{timer := emqx_misc:start_timer(timer:seconds(Interval), check)}.
case erlang:system_info(system_architecture) of
"x86_64-pc-linux-musl" -> State;
_ -> State#{timer := emqx_misc:start_timer(timer:seconds(Interval), check)}
end.

0 comments on commit 9cdaa71

Please sign in to comment.