Forked from kellymclaughlin/pb_status_anon.txt
Last active
December 17, 2015 16:18
-
-
Save cdahlqvist/5637415 to your computer and use it in GitHub Desktop.
Revisions
-
Christian Dahlqvist revised this gist
May 24, 2013 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,18 @@ PBStatusFun = fun() -> [poolboy:status(Pid) || Pid <- PoolboyPids] end. PBStatusCountFun = fun() -> VnodePids = [Pid || {_, Pid} <- riak_core_vnode_manager:all_index_pid(riak_kv_vnode)], Links = [process_info(Pid, [links]) || Pid <- VnodePids], WorkerPoolPids = [WPPid || [{links,[_, WPPid]}] <- Links], WorkerPoolLinks = [process_info(Pid, [links]) || Pid <- WorkerPoolPids], PoolboyPids = [PoolboyPid || [{links,[_, PoolboyPid]}] <- WorkerPoolLinks], List = [poolboy:status(Pid) || Pid <- PoolboyPids], dict:to_list(lists:foldl(fun(Item, Acc) -> dict:update_counter(Item, 1, Acc) end, dict:new(), List)) end. PBStatusFun = fun(Index) -> {_, VnodePid} = riak_core_vnode_manager:get_vnode_pid(Index, riak_kv_vnode), Links = process_info(VnodePid, [links]), -
kellymclaughlin revised this gist
Nov 15, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ PBStatusFun = fun(Index) -> WorkerPoolLink = process_info(WorkerPoolPid, [links]), [{links,[_, PoolboyPid]}] = WorkerPoolLink, Status = poolboy:status(PoolboyPid), io:format("Pool Pid: ~p Status: ~p~n", [PoolboyPid, Status]) end. %% Paste this into console and then run: PBStatusFun(). -
kellymclaughlin revised this gist
Nov 15, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,8 @@ PBStatusFun = fun(Index) -> [{links,[_, WorkerPoolPid]}] = Links, WorkerPoolLink = process_info(WorkerPoolPid, [links]), [{links,[_, PoolboyPid]}] = WorkerPoolLink, Status = poolboy:status(PoolboyPid), io:format("Pool Pid: ~p Status: ~p~n", [Pid, Status]) end. %% Paste this into console and then run: PBStatusFun(). -
kellymclaughlin revised this gist
Nov 7, 2012 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,13 @@ PBStatusFun = fun() -> [poolboy:status(Pid) || Pid <- PoolboyPids] end. PBStatusFun = fun(Index) -> {_, VnodePid} = riak_core_vnode_manager:get_vnode_pid(Index, riak_kv_vnode), Links = process_info(VnodePid, [links]), [{links,[_, WorkerPoolPid]}] = Links, WorkerPoolLink = process_info(WorkerPoolPid, [links]), [{links,[_, PoolboyPid]}] = WorkerPoolLink, poolboy:status(PoolboyPid) end. %% Paste this into console and then run: PBStatusFun(). -
kellymclaughlin created this gist
Sep 28, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ PBStatusFun = fun() -> VnodePids = [Pid || {_, Pid} <- riak_core_vnode_manager:all_index_pid(riak_kv_vnode)], Links = [process_info(Pid, [links]) || Pid <- VnodePids], WorkerPoolPids = [WPPid || [{links,[_, WPPid]}] <- Links], WorkerPoolLinks = [process_info(Pid, [links]) || Pid <- WorkerPoolPids], PoolboyPids = [PoolboyPid || [{links,[_, PoolboyPid]}] <- WorkerPoolLinks], [poolboy:status(Pid) || Pid <- PoolboyPids] end. %% Paste this into console and then run: PBStatusFun(). 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ -module(poolboy_helper). -compile(export_all). poolboy_status() -> VnodePids = [Pid || {_, Pid} <- riak_core_vnode_manager:all_index_pid(riak_kv_vnode)], Links = [process_info(Pid, [links]) || Pid <- VnodePids], WorkerPoolPids = [WPPid || [{links,[_, WPPid]}] <- Links], WorkerPoolLinks = [process_info(Pid, [links]) || Pid <- WorkerPoolPids], PoolboyPids = [PoolboyPid || [{links,[_, PoolboyPid]}] <- WorkerPoolLinks], [poolboy:status(Pid) || Pid <- PoolboyPids].