diff --git a/bin/pm2 b/bin/pm2 index aeb4aa481..d8f8db781 100755 --- a/bin/pm2 +++ b/bin/pm2 @@ -85,6 +85,7 @@ commander.version(pkg.version) .option('--disable-trace', 'disable transaction tracing with km') .option('--attach', 'attach logging after your start/restart/stop/reload') .option('--sort ', 'sort process according to field\'s name') + .option('--v8', 'enable v8 data collecting') .usage('[cmd] app'); commander.on('--help', function() { diff --git a/lib/API/schema.json b/lib/API/schema.json index 97400a3b7..1f23eb02f 100644 --- a/lib/API/schema.json +++ b/lib/API/schema.json @@ -192,6 +192,11 @@ "boolean" ] }, + "v8": { + "type": [ + "boolean" + ] + }, "increment_var": { "type": "string" }, diff --git a/lib/ProcessContainer.js b/lib/ProcessContainer.js index 2b1b3f176..573400cae 100644 --- a/lib/ProcessContainer.js +++ b/lib/ProcessContainer.js @@ -33,7 +33,8 @@ delete process.env.pm2_env; if (process.env.pmx !== 'false') require('pmx').init({ transactions: process.env.km_link == 'true' && process.env.trace == 'true' || false, - http: process.env.km_link == 'true' || false + http: process.env.km_link == 'true' || false, + v8: process.env.v8 === 'true' || false }); var stdFile = pm2_env.pm_log_path;