anchor.diff:    [{node, Node},{total_ram,Total_ram},{cores,Cores}].
   
   stats() ->
  -  Procs = erlang:system_info(process_count),
  -  {Ctxt,0} = erlang:statistics(context_switches),
  -  {GCs,GCwords,0} = erlang:statistics(garbage_collection),
  +  Procs                         = erlang:system_info(process_count),
  +  {Ctxt,0}                      = erlang:statistics(context_switches),
  +  {GCs,GCwords,0}               = erlang:statistics(garbage_collection),
     {{input,IoIn},{output,IoOut}} = erlang:statistics(io),
  -  {Reds,_} = erlang:statistics(reductions),
  -  RunQ = erlang:statistics(run_queue),
  +  {Reds,_}                      = erlang:statistics(reductions),
  +  RunQ                          = erlang:statistics(run_queue),
   
     [{now,prfTime:ts()},
      {procs,Procs},
  
positive.code: 
  os_info({linux,#fds{proc_stat=FDs,proc_self_stat=FDss}}) ->
    proc_stat(FDs)++proc_self_stat(FDss);
  os_info(_) ->
    [].
  
  proc_stat(FDs) ->
  %%user nice kernel idle iowait irq softirq steal
  
negative.code:   end.
  
  init_ps() ->
    {open_port({spawn,"/bin/sh"},[stream]),
     "ps -o pid,utime,time,vsz,rss,majflt,minflt -p "++os:getpid()++"\n"}.
  
  do_ps(Port,Cmd) ->
    case port_command(Port,Cmd) of
      true ->
        receive
          {Port,{data,Data}} ->
            case[string:tokens(L," ")||L<-string:tokens(Data,"\n")] of
              [["PID","UTIME","TIME","VSZ","RSS","MAJFLT","MINFLT"],
  %%           ["1","0:00.20","0:00.30","2488932","12600","-","-"]]
               [_,Utime,Time,Vsz,Rss,MajFault,MinFault]] ->
                UtimeSec = timestr_to_sec(Utime),
                TimeSec =  timestr_to_sec(Time),              % system+user time
                [{beam_user,UtimeSec},
                 {beam_kernel,TimeSec-UtimeSec},
                 {beam_vsz,to_int(Vsz)*1024},                 % to bytes
                 {beam_rss,to_int(Rss)},                      % in kB pages
                 {beam_minflt,to_int(MinFault)},
                 {beam_majflt,to_int(MajFault)}];
              _ ->
                []
            end
        end;
      false ->
        []
    end.
  
  %% "8:11.15"
  timestr_to_sec(Str) ->
    case string:tokens(Str,":.") of
      [Min,Sec,CentiSec] -> 60*to_int(Min)+to_int(Sec)+to_int(CentiSec)/100;
      _ -> 0
    end.
  