Last active
June 29, 2018 03:16
-
-
Save ferd/6990844 to your computer and use it in GitHub Desktop.
Monitor long scheduling, long gc, and busy distributed ports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
F = fun(F) -> | |
receive | |
{monitor, Pid, long_schedule, Info} -> io:format(user, "monitor=long_schedule pid=~p info=~p~n", [Pid, Info]); | |
{monitor, Pid, busy_dist_port, Port} -> io:format(user, "monitor=busy_dist_port pid=~p port=~p~n" ,[Pid, Port]); | |
{monitor, Pid, long_gc, Info} -> io:format(user, "monitor=long_gc pid=~p info=~p~n", [Pid, Info]) | |
end, | |
F(F) | |
end. | |
Setup = fun() -> register(temp_sys_monitor, self()), erlang:system_monitor(self(), [{long_schedule, 1000}, busy_dist_port, {long_gc, 1000}]), F(F) end. | |
recon:rpc(fun() -> spawn(Setup) end). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment