lib/index.js
/**
 * Get the status of one worker
 * @author amadormf
 * @param  {Number} Id of worker for get status
 * @param  {Function}  Function callback with 2 parameters, error and status of worker
 */
Get the status of one worker
@author amadormf
@param  {Number} Id of worker for get status
@param  {Function}  Function callback with 2 parameters, error and status of worker
Get the status of one worker @author amadormf @param { Number } Id of worker for get status @param { Function } Function callback with 2 parameters error and status of worker
function statusWorker(id, callback){
	if(cluster.workers[id]){
		pidusage.stat(cluster.workers[id].process.pid, function(err, stats){
			if(err){
				callback(err);
			}
			else{
				stats.id = id;
				stats.pid = cluster.workers[id].process.pid;
				callback(null, stats);
			}
		});
	}
	else{
		callback("No worker with id=" + id + " exists");
	}
}
function statusWorker ( id , callback ) { if ( cluster . workers [ id ] ) { pidusage . stat ( cluster . workers [ id ] . process . pid , function ( err , stats ) { if ( err ) { callback ( err ) ; } else { stats . id = id ; stats . pid = cluster . workers [ id ] . process . pid ; callback ( null , stats ) ; } } ) ; } else { callback ( "No worker with id=" + id + " exists" ) ; } }
Get the status of one worker
 @author amadormf
 @param  {Number} Id of worker for get status
 @param  {Function}  Function callback with 2 parameters, error and status of worker
Get the status of one worker @author amadormf @param { Number } Id of worker for get status @param { Function } Function callback with 2 parameters error and status of worker