mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
rename PM2 and clustered processes when running (vizible with ps or htop)
This commit is contained in:
parent
9d1d115df2
commit
8dbdf00b36
@ -1,6 +1,7 @@
|
||||
|
||||
# 0.11.2
|
||||
|
||||
- Rename process running with PM2 <version> - app_name
|
||||
- Inner iteraction with PM2 possible #782
|
||||
- Better vizion system
|
||||
- backward / forward / pull command
|
||||
|
||||
@ -12,6 +12,8 @@ var cst = require('../../constants.js');
|
||||
var util = require('util');
|
||||
var Common = require('../Common');
|
||||
|
||||
var pkg = require('../../package.json');
|
||||
|
||||
/**
|
||||
* Description
|
||||
* @method exports
|
||||
@ -39,6 +41,8 @@ module.exports = function ClusterMode(God) {
|
||||
cluster.settings.execArgv = env_copy.node_args;
|
||||
}
|
||||
|
||||
env_copy._pm2_version = pkg.version;
|
||||
|
||||
try {
|
||||
clu = cluster.fork(env_copy);
|
||||
} catch(e) {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
// Rename process
|
||||
if (process.env.name != null)
|
||||
process.title = 'pm2: ' + process.env.name;
|
||||
process.title = 'PM2 v' + process.env._pm2_version + ': ' + process.env.name;
|
||||
|
||||
var fs = require('fs');
|
||||
var p = require('path');
|
||||
|
||||
@ -586,6 +586,9 @@ Satan.unlock = function(opts, cb) {
|
||||
// this process is being forked by pm2 itself
|
||||
//
|
||||
if (require.main === module) {
|
||||
process.title = 'pm2: Daemon';
|
||||
|
||||
var pkg = require('../package.json');
|
||||
|
||||
process.title = 'PM2 v' + pkg.version + ': God Daemon';
|
||||
Satan.remoteWrapper();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user