1

I found this excellent website which gives an example upstart script for running Python scripts as daemons. My question is, can I change the name it reports as when I type ps -e?

I was thinking start-stop-daemon might have an option to do that but I haven't found it.

Nathan Tuggy
  • 2,237
  • 27
  • 30
  • 38

1 Answers1

0

In pure python, there's no easy way to do it.

The setproctitle package, however, could prove useful. It allows a python process to set its process name. It's a C extension that has support for a number of operating systems, and supports both Python 2 and 3. It does appear that it may be unmaintained now, but it is still working well for me.

cge
  • 9,552
  • 3
  • 32
  • 51