Change the ruby process name in top

后端 未结 7 837
渐次进展
渐次进展 2021-02-18 14:19

I would like to change the name of the ruby process that gets displayed in the linux/unix top command. I have tried the

$0=\'miname\'

approach

7条回答
  •  渐次进展
    2021-02-18 14:33

    Dave Thomas had an interesting post on doing this in rails. There's nothing rails specific about the actual process name change code. He uses the $0='name' approach. When I followed his steps the name was changed in ps and top.

    In the post he suggests using the c keyboard command if your version of top doesn't show the short version of the command by default.

提交回复
热议问题