NAME
psa - PSA site runner
SYNOPSIS
psa [options] [ -p PHASE ] [ -i SOCKET ] [ directory ]
psa -c etc/psa.yml
DESCRIPTION
This program starts and monitors a Perl Server Application.
Reasonable defaults exist for almost everything, so if this script is run - be it via mod_perl, FastCGI, plain CGI or whatever - it will always respond with something :)
Unless daemon operation is asked for using the -d switch, the program will remain `interactive'; which means either a full-screen curses based interface (the PSA `Console'), or a text-based `tail' of application access and events.
COMMAND LINE OPTIONS
- -c, --config=FILENAME
-
Specify a configuration file. Defaults to etc/psa.yml.
- -d, --daemon
-
After setting up the application, daemonise (disassociate from the current terminal, become a new session leader, fork twice, etc).
- -D, --debug
-
Override all config-file specified logging action, and log all PSA events to standard error. Also, disable the process manager and interactive monitor.
- -p, --phase=PHASE
-
Set the development phase, as defined in the config file. This will normally change the database that is connected to, and possibly configure experimental features of the application.
- -i, --io=SOCKET
-
Specify the socket to communicate on. For HTTP mode, this only really makes sense to be a hostname:port combination, but for FastCGI mode it can also be a UDS socket.
This parameter can also be specified via the FCGI_SOCKET_PATH environment variable, which implies
-P fastcgi
.Examples:
- -P, --protocol=PROTO
-
Specify socket protocol. Currently accepted values are
FastCGI
andHTTP
. - -u, --user=USER, --uid=UID
- -g, --group=GROUP, --gid=GID
-
Switch to the specified user or user ID and/or group or group ID after acquiring the input socket (and before reading any user configuration or code).
This option will not be honoured in the configuration file, unless the file and its parent directories are all `secure' (ie, owned by the superuser and not open permissions).
This option is implicit if the psa program is run as the super-user, and the permissions are `secure'. The default user to run as is the owner of the configuration file and parent directories, but again such directories must be `secure'. Specifying these options manually will bypass the directory permissions checks.
Unless you specify the super-user with -u, psa will refuse to run as root.
- -k, --kill
-
Stops a running PSA application
- -a, --all
-
Looks at the master PSA configuration file for a list of sites, then starts/kills them all.
TO-DO Features
A heads-up display for the Perl Server application, curses/gtk based is vaguely planned.
- -n, --no-monitor
-
Disables the interactive PSA monitor, which is also the effect of not being connected to a fully featured terminal.
In this mode, the configuration is printed once on standard output at startup, and accesses and INFO level messages and above are printed on standard output.
- -R, --reattach
-
Attach to the current PSA process monitor and display the interactive PSA monitor.
- -m, --module=MODULE
-
Loads the specified PSA module.
Modules that ship with PSA include
Pixie
,Tangram
,Heap
,Storage
,Console
,l4p
,Monitor
,Audit
,thread
. - -M, --module-config=MODULE:param=VALUE
-
Set the
param
configuration option for the MODULE loaded module toVALUE
. Multipleparam=value
pairs may be listed by separating them with colons.Examples (see individual module manual pages for more information):
- -MPM:maxproc=10:minfree=2:maxfree=5
-
Configures the process manager to keep 2-5 free threads/processes, but never to exceed 10 active threads.
- -Ml4p:logger=FATAL,Screen
-
Configures Log4perl to send all fatal messages to the screen
- -MTangram:dsn=dbi:Pg:dbname=bob
-
Specify to use a Postgres store with the PSA::Tangram module, and to
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 170:
'=item' outside of any '=over'
=over without closing =back
- Around line 200:
Expected text after =item, not a bullet