Skip to content

Instantly share code, notes, and snippets.

@stevendanna
Last active September 7, 2015 14:32
Show Gist options
  • Save stevendanna/a2a002bb84683462c21b to your computer and use it in GitHub Desktop.
Save stevendanna/a2a002bb84683462c21b to your computer and use it in GitHub Desktop.
-define(SELF, 'monitor@127.0.0.1').
-define(BIFROST, 'oc_bifrost@127.0.0.1').
-define(BIFROST_COOKIE, 'oc_bfirost').
init_network() ->
net_kernel:start([?SELF, longnames]),
erlang:set_cookie(node(), ?BIFROST_COOKIE),
pong = net_adm:ping(?BIFROST).
main(_Args) ->
init_network(),
Count = rpc:call(?BIFROST, mochiweb_socket_server, get, [webmachine_mochiweb, waiting_acceptors]),
io:format("~p~n", [Count]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment