Check active timers in Erlang
Is there a simple way to get a list of all currently waiting timers started with erlang:send_after , erlang:apply_after , etc. in Erlang? For debugging purposes you can use dbg :). First create an ets table which will store all timer references. 1> ets:new(timer_dbg, ['public', 'named_table', 'bag']). timer_dbg Then create a dbg handler function, which checks for calls returning from erlang:send_after, and saves the returned timer reference to the table 2> Fun = fun({'trace', _Pid, 'return_from', {erlang, send_after, 3}, Ref}, []) -> 2> ets:insert(timer_dbg, {Ref}), []; 2> (_Msg, []) -> 2> []