anchor.diff:      %% set configs
       {set_lines,N} when integer(N) -> 
         loop(LD#ld{lines = N});		        %number of displayed processes
  -    {set_trigger,{ID,Fun}} ->
  -      loop(LD#ld{triggers=new_triggers(LD#ld.triggers,ID,Fun)});
  +    list_triggers ->
  +      print_term(group_leader(),LD#ld.triggers),
  +      loop(LD);
  +    {del_trigger,ID} ->
  +      loop(LD#ld{triggers=del_trigger(LD#ld.triggers,ID)});
  +    {add_trigger,{ID,Fun}} ->
  +      loop(LD#ld{triggers=add_trigger(LD#ld.triggers,ID,Fun)});
  +    list_subscribers ->
  +      print_term(group_leader(),LD#ld.subscribers),
  +      loop(LD);
  +    clear_subscribers ->
  +      loop(LD#ld{subscribers=[]});
       {add_subscriber,Sub} ->
         loop(LD#ld{subscribers=[Sub|LD#ld.subscribers]});
       %% fake trigger for debugging
  
positive.code: %% Val :: number() | function()
  %% ID :: list(Tag) 
  %% Tag :: atom() - tags into the data structure. i.e. [prfSys,iowait]
  new_triggers(Triggers,ID,Fun) -> 
    maybe_restart(hd(ID),[{ID,Fun}|clean_triggers(Triggers,[ID])]).
  
  maybe_restart(sysMon,Triggers) -> stop_monitor(),start_monitor(Triggers);
  maybe_restart(_,Triggers) -> Triggers.
  
  clean_triggers(Triggers,IDs) ->
    lists:filter(fun({ID,_})->not lists:member(ID,IDs) end, Triggers).
  
negative.code: -module(watchdog).
  
  -export([start/0,stop/0]).
  -export([add_send_subscriber/3,add_log_subscriber/0,clear_subscribers/0]).
  -export([message/1]).
  -export([loop/1]).
  
  -include("log.hrl").
  
  -record(ld, 
  	{jailed=[]			 %jailed pids
  	 ,subscribers=[]		 %where to send our reports
  	 ,triggers=default_triggers()	 %{atom(Tag), fun/1->no|fun/1}
  	 ,prfState			 %prfTarg:subscribe return val
  	 ,userData			 %last user data
  	 ,prfData			 %last prf data
  	 ,monData			 %last system_monitor data
  	 ,lines=5			 %# of displayed procs
  	}).
  
  %% constants
  
  default_triggers() -> 
    [ {[sysMon,long_gc],500}	      %gc time [ms]
     ,{[sysMon,large_heap],1024*1024}    %heap size [words]
     ,{user,true}
     ,{ticker,true}
     ,{[prfSys,user],fun(X)->true=(0.95<X) end}
  