How to change the command line in the process list?

How does nginx appear in a process list like this?

$ ps -ef | grep nginx
... S     9:16   0:08.43 nginx: worker process
... Ss    9:16   0:00.00 nginx: master process nginx

I want to change the process name of the CLI program in node.js.

+3
source share
1 answer

In Node.js, you can change process.titleto set the process title shown in ps.

+5
source

All Articles