Supervisor / supervisor

Supervisor process control system for Unix (supervisord)
http://supervisord.org
Other
8.34k stars 1.23k forks source link

Show 'changed' info in status command #1552

Closed sblondon closed 1 year ago

sblondon commented 1 year ago

I'd like to see if a process should be restarted when displaying the status. It's easy to forget to reread the configuration file after modifying it. In such case, the user try to restart it and does not understand why the changes are not used.

Currently, the output is:

supervisor> status
demo                             RUNNING   pid 16371, uptime 0:02:43
demo2                            RUNNING   pid 16372, uptime 0:02:43

It could be something like:

supervisor> status
demo                             RUNNING  changed pid 16371, uptime 0:02:43
demo2                            RUNNING  -       pid 16372, uptime 0:02:43

Adding such info would break the backward compatibility if scripts parse the output. To address this new problem, a configuration could be added to set the output of status in /etc/supervisor/supervisord.conf file. I think about two ways to implement it:

IMO, Solution 2 is better because it's more versatile and allows to add new data in the future if needed.

Another way would be to add a new command to do that but the general usage of supervisorctl will be less clear so I think it's solution 2 is better than this one too.

What do you think about:

I'm interested to make the PRs to implement it.

sblondon commented 1 year ago

@mnaberez what is your opinion about such feature?

mnaberez commented 1 year ago

Merged into issue #582