anchor.diff:       {node_put_fsm_time_99, PutNN},
        {node_put_fsm_time_100, PutH}].
   
  +%% @spec cpu_stats() -> proplist()
  +%% @doc Get stats on the cpu, as given by the cpu_sup module
  +%%      of the os_mon application.
   cpu_stats() ->
       [{cpu_nprocs, cpu_sup:nprocs()},
        {cpu_avg1, cpu_sup:avg1()},
        {cpu_avg5, cpu_sup:avg5()},
        {cpu_avg15, cpu_sup:avg15()}].
   
  +%% @spec mem_stats() -> proplist()
  +%% @doc Get stats on the memory, as given by the memsup module
  +%%      of the os_mon application.
   mem_stats() ->
       {Total, Alloc, _} = memsup:get_memory_data(),
       [{mem_total, Total},
        {mem_allocated, Alloc}].
   
  +%% @spec disk_stats() -> proplist()
  +%% @doc Get stats on the disk, as given by the disksup module
  +%%      of the os_mon application.
   disk_stats() ->
       [{disk, disksup:get_disk_data()}].
  
positive.code: -record(state,{vnode_gets,vnode_puts,
                 get_fsm_time,put_fsm_time}).
  
  %%====================================================================
  %% API
  %%====================================================================
  %%--------------------------------------------------------------------
  %% Function: start_link() -> {ok,Pid} | ignore | {error,Error}
  %% Description: Starts the server
  %%--------------------------------------------------------------------
  start_link() ->
      case application:start(os_mon) of
          ok -> ok;
  
negative.code:     end,
      gen_server2:start_link({local, ?MODULE}, ?MODULE, [], []).
  
  %% @spec get_stats() -> proplist()
  %% @doc Get the current aggregation of stats.
  get_stats() ->
      gen_server2:call(?MODULE, get_stats).
  
  %% @spec update(term()) -> ok
  %% @doc Update the given stat.
  update(Stat) ->
      gen_server2:cast(?MODULE, {update, Stat, riak_util:moment()}).
  
  %% @private
  init([]) ->
      {ok, #state{vnode_gets=spiraltime:fresh(),
                  vnode_puts=spiraltime:fresh(),
                  get_fsm_time=slide:fresh(),
                  put_fsm_time=slide:fresh()}}.
  
  %% @private
  handle_call(get_stats, _From, State) ->
      {reply, produce_stats(State), State};
  handle_call(_Request, _From, State) ->
      Reply = ok,
      {reply, Reply, State}.
  
  %% @private
  handle_cast({update, Stat, Moment}, State) ->
      {noreply, update(Stat, Moment, State)};
  handle_cast(_Msg, State) ->
      {noreply, State}.
  
  %% @private
  handle_info(_Info, State) ->
      {noreply, State}.
  
  %% @private
  terminate(_Reason, _State) ->
      ok.
  
  %% @private
  code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  