Jelajahi Sumber

fix: memsup's memory alway false.

Zhongwen Deng 4 tahun lalu
induk
melakukan
4eec83b0e5
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      apps/emqx/src/emqx_os_mon.erl

+ 1 - 1
apps/emqx/src/emqx_os_mon.erl

@@ -159,7 +159,7 @@ ensure_system_memory_alarm(HW) ->
     case erlang:whereis(memsup) of
     case erlang:whereis(memsup) of
         undefined -> ok;
         undefined -> ok;
         _Pid ->
         _Pid ->
-            {Allocated, Total, _Worst} = memsup:get_memory_data(),
+            {Total, Allocated, _Worst} = memsup:get_memory_data(),
             case Total =/= 0 andalso Allocated/Total * 100 > HW of
             case Total =/= 0 andalso Allocated/Total * 100 > HW of
                 true -> emqx_alarm:activate(high_system_memory_usage, #{high_watermark => HW});
                 true -> emqx_alarm:activate(high_system_memory_usage, #{high_watermark => HW});
                 false -> ok
                 false -> ok