%%%------------------------------------------------------------------- %%% @author anlicheng %%% @copyright (C) 2025, %%% @doc %%% %%% @end %%% Created : 03. 6月 2025 14:09 %%%------------------------------------------------------------------- -module(efka_monitor). -author("anlicheng"). %% API -export([]). %% API -export([memory_top/1, cpu_top/1, stop/0]). memory_top(Interval) when is_integer(Interval) -> spawn(fun()->etop:start([{output, text}, {interval, Interval}, {lines, 20}, {sort, memory}])end). cpu_top(Interval) when is_integer(Interval) -> spawn(fun()->etop:start([{output, text}, {interval, Interval}, {lines, 20}, {sort, runtime}])end). stop() -> etop:stop().