Instructions for Controlling GUPPI Controller Software
About supervisord
GUPPI uses
supervisord to manage the guppi controller processes on beef and on the bee2. On both hosts, supervisord is set to run at boot (see
/etc/init.d and
rc.d links), and reads the configuration at
/etc/supervisord.conf.
Interacting with supervisord
The
supervisor package (installed on beef in
/opt/64bit) includes a
supervisorctl utility to interact with the
supervisord server. Use
/opt/64bit/bin/supervisorctl with superuser priveleges. This is added to your PATH if you source the guppi environment shell script.
$ source /opt/64bit/guppi/guppi.bash
or
$ source /opt/64bit/guppi/guppi.csh
The examples below are from a session on host 'beef.' Note that the guppi server log is very terse in these examples; it only displays a timestamp when the server was started. You'll see that these timestamps are very close together as a result of restarting the server so many times from supervisor.
Launching supervisorctl interactively
Just run
supervisorctl from the command line to launch an interactive session with supervisorctl.
$ sudo supervisorctl
guppi RUNNING pid 30871, uptime 0:43:50
simple-test EXITED Mar 20 10:17 AM
host_supervisor> tail
Error: too few arguments
tail [-f] <name> [stdout|stderr] (default stdout)
Ex:
tail -f <name> Continuous tail of named process stdout
Ctrl-C to exit.
tail -100 <name> last 100 *bytes* of process stdout
tail <name> stderr last 1600 *bytes* of process stderr
host_supervisor> tail guppi
running guppi server Fri Mar 20 10:11:17 EDT 2009
running guppi server Fri Mar 20 10:16:42 EDT 2009
running guppi server Fri Mar 20 10:17:00 EDT 2009
running guppi server Fri Mar 20 10:18:13 EDT 2009
running guppi server Fri Mar 20 10:21:42 EDT 2009
host_supervisor> restart guppi
guppi: stopped
guppi: started
host_supervisor> status
guppi RUNNING pid 31789, uptime 0:00:10
simple-test EXITED Mar 20 10:17 AM
host_supervisor>
Managing supervisor from the shell
You can also run
supervisorctl from the command-line with the same arguments you would use in an interactive
supervisorctl session.
$ sudo supervisorctl tail guppi
running guppi server Fri Mar 20 10:11:17 EDT 2009
running guppi server Fri Mar 20 10:16:42 EDT 2009
running guppi server Fri Mar 20 10:17:00 EDT 2009
$ sudo supervisorctl restart guppi
guppi: stopped
guppi: started
$ sudo supervisorctl tail guppi
running guppi server Fri Mar 20 10:11:17 EDT 2009
running guppi server Fri Mar 20 10:16:42 EDT 2009
running guppi server Fri Mar 20 10:17:00 EDT 2009
running guppi server Fri Mar 20 10:18:13 EDT 2009
$ sudo supervisorctl stop guppi
guppi: stopped
$ sudo supervisorctl start guppi
guppi: started
$
If you see any errors while running the above commands, there might be an installation issue with the guppi controller software. If you suspect supervisor isn't working, you can restart the
supervisord process and run some tests (which are in the configuration on 'beef'). Verify that supervisord is installed and configured with
simple-test on beef, which just appends a timestamp to a log file. If any of the following commands fail, there is likely an installation/configuration issue with
supervisord.
$ sudo /etc/init.d/supervisord restart
Stopping supervisord: [ OK ]
Starting supervisord: [ OK ]
$ sudo supervisorctl status
guppi RUNNING pid 30792, uptime 0:00:19
simple-test STOPPED Not started
$ sudo supervisorctl start simple-test
simple-test: started
$ sudo supervisorctl tail simple-test
Wed Mar 11 21:35:39 EDT 2009
Wed Mar 11 21:35:51 EDT 2009
Wed Mar 11 21:51:49 EDT 2009
Thu Mar 12 14:59:56 EDT 2009
Thu Mar 12 15:01:04 EDT 2009
Fri Mar 20 10:17:38 EDT 2009
--
RonDuPlain - 2009-03-20