Merge pull request #2808 from emqx/invalid_cpu_alarm

Don't check cpu util on Alpine that uses libc-musl
This commit is contained in:
turtleDeng 2019-08-19 17:05:33 +08:00 committed by GitHub
commit 68f6a43492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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.