function stats(master){
    var server = master.server;
    master.connectionStats = options.connections;
    master.requestStats = options.requests;
    master.lightRequestStats = options.lightRequests;

    // worker stats
    if (master.isWorker) {
      var id = 0;
  
      // connections
      if (options.connections) {
        server.on('connection', function(sock){
          var data = { remoteAddress: sock.remoteAddress };
          master.call('reportStats', 'connection', data);
          sock.on('close', function(){
            master.call('reportStats', 'disconnection', data);
          });
        });
      }

      // light-weight requests
      if (options.lightRequests) {
        utils.unshiftListener(server, 'request', function(req, res){
          master.call('reportStats', 'light request', res.id = ++id);
          var end = res.end;
          res.end = function(str, encoding){
            res.end = end;
            res.end(str, encoding);
            master.call('reportStats', 'light request complete', res.id);
          };
        });
      } 

      // requests
      if (options.requests) {
        utils.unshiftListener(server, 'request', function(req, res){
          var data = {
              remoteAddress: req.socket.remoteAddress
            , headers: req.headers
            , httpVersion: req.httpVersion
            , method: req.method
            , url: req.url
            , id: ++id
          };

          master.call('reportStats', 'request', data);

          var end = res.end;
          res.end = function(str, encoding){
            res.end = end;
            res.end(str, encoding);
            master.call('reportStats', 'request complete', data);
          };
        });
      }
    // master stats
    } else {
      master.stats = {
          start: new Date
        , restarts: 0
        , workersSpawned: 0
        , workersKilled: 0
      };

      // 0.4.x
      if (os) {
        master.stats.totalmem = os.totalmem();
        master.stats.freemem = os.freemem();
      }

      // worker stats
      master.reportStats = function(worker, type, data){
        master.emit('client ' + type, worker, data);
        switch (type) {
          case 'connection':
            worker.stats.connectionsTotal++;
            worker.stats.connectionsActive++;
            break;
          case 'disconnection':
            worker.stats.connectionsActive--;
            break;
          case 'light request':
          case 'request':
            worker.stats.requestsTotal++;
        }
      };

      // total workers spawned
      master.on('worker', function(worker){
        ++master.stats.workersSpawned;
        worker.stats = {
            start: new Date
          , connectionsTotal: 0
          , connectionsActive: 0
          , requestsTotal: 0
        };
      });

      // total worker deaths
      master.on('worker killed', function(worker){
        ++master.stats.workersKilled;
      });

      // restarting
      master.on('restarting', function(data){
        ++master.stats.restarts;
        data.stats = master.stats;
      });

      // restart
      master.on('restart', function(data){
        master.stats = data.stats;
        master.stats.start = new Date(master.stats.start);
      });
    }
  }
Enable stat tracking with the given `options`.

Options:

 - `connections`    enable connection statistics
 - `requests`       enable request statistics
 - `lightRequests`  enable light-weight request statistics

Real-time applications should utilize `lightRequests` for reporting
when possible, although less data is available.

TODO: UDP

@param {Object} options
@return {Function}
@api public