lib/processMonitor.js
function getPsInfo(param, callback) { 
	if (process.platform === 'windows') return;
	var pid = param.pid;
	var cmd = "ps auxw | grep " + pid + " | grep -v 'grep'";
	//var cmd = "ps auxw | grep -E '.+?\\s+" + pid + "\\s+'"  ;
	exec(cmd, function(err, output) {
		if (!!err) {
			if (err.code === 1) {
				console.log('the content is null!');
			} else {
				console.error('getPsInfo failed! ' + err.stack);
			}
			callback(err, null);
			return;
		} 
    format(param, output, callback);
	});
}
function getPsInfo(param, callback) { 
	if (process.platform === 'windows') return;
	var pid = param.pid;
	var cmd = "ps auxw | grep " + pid + " | grep -v 'grep'";
	//var cmd = "ps auxw | grep -E '.+?\\s+" + pid + "\\s+'"  ;
	exec(cmd, function(err, output) {
		if (!!err) {
			if (err.code === 1) {
				console.log('the content is null!');
			} else {
				console.error('getPsInfo failed! ' + err.stack);
			}
			callback(err, null);
			return;
		} 
    format(param, output, callback);
	});
}
function getPsInfo ( param , callback ) { if ( process . platform === 'windows' ) return ; var pid = param . pid ; var cmd = "ps auxw | grep " + pid + " | grep -v 'grep'" ; //var cmd = "ps auxw | grep -E '.+?\\s+" + pid + "\\s+'"  ;
 exec ( cmd , function ( err , output ) { if ( ! ! err ) { if ( err . code === 1 ) { console . log ( 'the content is null!' ) ; } else { console . error ( 'getPsInfo failed! ' + err . stack ) ; } callback ( err , null ) ; return ; } format ( param , output , callback ) ; } ) ; }
get the process information by command 'ps auxw | grep serverId | grep pid'

@param {Object} param
@param {Function} callback
@api public
get the process information by command ps auxw | grep serverId | grep pid