From 182d5583394d15bec0e7a10542bc8b9e40811b59 Mon Sep 17 00:00:00 2001 From: Alex Whitman Date: Mon, 20 May 2013 11:33:40 +0100 Subject: [PATCH] Set the process title to 'statsd' Makes it easier to see which node processes are statsd when looking at a process list. --- README.md | 2 +- stats.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 684464b0..dbf521ff 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ A test framework has been added using node-unit and some custom code to start and manipulate statsd. Please add tests under test/ for any new features or bug fixes encountered. Testing a live server can be tricky, attempts were made to eliminate race conditions but it may be possible to encounter a stuck state. If -doing dev work, a `killall node` will kill any stray test servers in the +doing dev work, a `killall statsd` will kill any stray test servers in the background (don't do this on a production machine!). Tests can be executed with `./run_tests.sh`. diff --git a/stats.js b/stats.js index e9a20dbb..b2e2cca0 100644 --- a/stats.js +++ b/stats.js @@ -410,6 +410,8 @@ config.configFile(process.argv[2], function (config, oldConfig) { } }); +process.title = 'statsd'; + process.on('SIGTERM', function() { if (conf.debug) { util.log('Starting Final Flush');