Skip to content

this adds support for status output for groups #135

Closed
wants to merge 2 commits into from

6 participants

@simonjj
simonjj commented Jul 18, 2012

example usage:

supervisorctl status backend:*

example output:

backend:backend_0                RUNNING    pid 3830, uptime 0:00:07
backend:backend_1                RUNNING    pid 3831, uptime 0:00:07
@simonjj
simonjj commented Jul 19, 2012

While it's certainly good practice to remind the user of the potentially dangerous configuration, it appears as if the client prints this message regardless of the server configuration. In my case supervisord runs as a non root user and a config file specified via -c:

(myapp-env)[myapp-admin@centos-62 ~]$ ps aux | grep -i supervisor
501      29897  0.0  0.2 204084 12220 ?        Ss   13:30   0:00 /home/myapp-admin/myapp-env/bin/python2.7 /home/myapp-admin/myapp-env/bin/supervisord -c /etc/supervisord.conf -u myapp-admin

Without fix 8e168f8 the client seems to solely care about it's own command line arguments, which is somewhat misleading/annoying and could be interpreted as a bug.

(myapp-env)[root@centos-62 init.d]# supervisorctl status
/home/myapp-admin/supervisor/supervisor/options.py:285: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
frontend:frontend_0                RUNNING    pid 30209, uptime 0:48:25
backend:backend_0                  RUNNING    pid 29900, uptime 1:21:56
auth:auth_0                        RUNNING    pid 29939, uptime 1:21:01
@xiaogaozi

Does this PR continue?

@simonjj
simonjj commented Feb 12, 2014

looks like this hasn't been merged, so I'd say yes.

@johtso
johtso commented Feb 14, 2014

Would be really great to get this in!

@msabramo

It looks like there are two changes in this branch/PR:

  1. add group syntax (group:*) to status command. I have always wanted this, so thank you! This worked great!
$ git cherry-pick 8732832
[status_group_asterisk 0f16f7c] adding support for group status output
 Author: Simon <simonjj@gmail.com>
 2 files changed, 18 insertions(+), 1 deletion(-)
$ python ./supervisor/supervisorctl.py
supervisor> status profilesvc:*
profilesvc:9601                  FATAL      Exited too quickly (process log may have details)
profilesvc:9600                  FATAL      Exited too quickly (process log may have details)
profilesvc:9603                  FATAL      Exited too quickly (process log may have details)
profilesvc:9602                  FATAL      Exited too quickly (process log may have details)
profilesvc:9604                  FATAL      Exited too quickly (process log may have details)
  1. Fix issue with supervisorctl complaining about running as root user -- 8e168f8 -- this was already committed it seems as 6dc0368 -- maybe this PR should be rebased so that this is taken out? (not even sure why it's showing up)

:+1: to 8732832 to add support for group status output

@msabramo

Also, from the command line works too:

(profilesvc)vagrant@ubuntu:/opt/webapp/profilesvc/src/supervisor$ python ./supervisor/supervisorctl.py status profilesvc:*
profilesvc:9601                  RUNNING    pid 8688, uptime 0:01:33
profilesvc:9600                  RUNNING    pid 8689, uptime 0:01:33
profilesvc:9603                  RUNNING    pid 8690, uptime 0:01:32
profilesvc:9602                  RUNNING    pid 8691, uptime 0:01:31
profilesvc:9604                  RUNNING    pid 8692, uptime 0:01:30

So :+1: again to 8732832 to add support for group status output! Thanks, @simonjj! I hope that @mnaberez will take a look at this and possibly merge it if it looks good to him.

@msabramo

I created PR #383, which has just the one commit needed for group support for supervisorctl status.

@mnaberez mnaberez closed this in 9354776 Feb 25, 2014
@mnaberez
Supervisor member

@simonjj Thanks for this patch. I implemented this a bit differently but the end usage should be the same. Please give it a try.

@werdender

supervisorctl status | grep <group name>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.