petre2dor / piGarden

Irrigation system powered by raspberry pi. work in progress...
GNU General Public License v3.0
7 stars 0 forks source link

add process name to index.js for clearer 'netstat' listing #18

Closed rcursaru closed 7 years ago

rcursaru commented 8 years ago

current status:

vagrant@vagrant-ubuntu-trusty-64:~$ sudo netstat -anp4 | grep index.js tcp 0 0 127.0.0.1:50131 127.0.0.1:3306 ESTABLISHED 2121/index.js tcp 0 0 127.0.0.1:50129 127.0.0.1:3306 ESTABLISHED 2121/index.js tcp 0 0 127.0.0.1:50135 127.0.0.1:3306 ESTABLISHED 2127/index.js tcp 0 0 127.0.0.1:50132 127.0.0.1:3306 ESTABLISHED 2121/index.js tcp 0 0 127.0.0.1:50134 127.0.0.1:3306 ESTABLISHED 2134/index.js tcp 0 0 127.0.0.1:50130 127.0.0.1:3306 ESTABLISHED 2121/index.js

process.title = 'some_string' should do the trick: https://nodejs.org/api/process.html#process_process_title