|
|
@@ -368,7 +368,7 @@ vm([]) ->
|
|
|
vm(["all"]);
|
|
|
|
|
|
vm(["all"]) ->
|
|
|
- [vm([Name]) || Name <- ["load", "memory", "process", "io"]];
|
|
|
+ [vm([Name]) || Name <- ["load", "memory", "process", "io", "ports"]];
|
|
|
|
|
|
vm(["load"]) ->
|
|
|
[?PRINT("cpu/~-20s: ~s~n", [L, V]) || {L, V} <- emqttd_vm:loads()];
|
|
|
@@ -387,12 +387,18 @@ vm(["io"]) ->
|
|
|
?PRINT("io/~-21s: ~w~n", [Key, get_value(Key, IoInfo)])
|
|
|
end, [max_fds, active_fds]);
|
|
|
|
|
|
+vm(["ports"]) ->
|
|
|
+ foreach(fun({Name, Key}) ->
|
|
|
+ ?PRINT("ports/~-16s: ~w~n", [Name, erlang:system_info(Key)])
|
|
|
+ end, [{count, port_count}, {limit, port_limit}]);
|
|
|
+
|
|
|
vm(_) ->
|
|
|
- ?USAGE([{"vm all", "Show info of erlang vm"},
|
|
|
- {"vm load", "Show load of erlang vm"},
|
|
|
- {"vm memory", "Show memory of erlang vm"},
|
|
|
- {"vm process", "Show process of erlang vm"},
|
|
|
- {"vm io", "Show IO of erlang vm"}]).
|
|
|
+ ?USAGE([{"vm all", "Show info of Erlang VM"},
|
|
|
+ {"vm load", "Show load of Erlang VM"},
|
|
|
+ {"vm memory", "Show memory of Erlang VM"},
|
|
|
+ {"vm process", "Show process of Erlang VM"},
|
|
|
+ {"vm io", "Show IO of Erlang VM"},
|
|
|
+ {"vm ports", "Show Ports of Erlang VM"}]).
|
|
|
|
|
|
%%--------------------------------------------------------------------
|
|
|
%% @doc mnesia Command
|