123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- .TH "pyfcgi" 1 "Mon Oct 28 2019" "Version 0.0.1" "PyFCGI" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- pyfcgi \- Python Fast CGI runner
- .SH "SYNOPSIS"
- .PP
- spawn-fcgi [OPTS] -- pyfcgi [OPTIONS]
- .SH "DESCRIPTION"
- .PP
- Run WSGI python application in a pool of worker\&.
- .SH "OPTIONS"
- .PP
- .SS "spawn-fcgi OPTIONS"
- OPTS are \fBspawn-fcgi(1)\fP options\&.
- .SS "General OPTIONS"
- \fB-h --help\fP
- .RS 4
- Display help and exit
- .RE
- .PP
- \fB-V --version\fP
- .RS 4
- Display pyfcgi and Python version and exit
- .RE
- .PP
- \fB-C --config=FILE\fP
- .RS 4
- load a configuration file
- .RE
- .PP
- \fB-l --listen=SOCK_PATH\fP
- .RS 4
- fcgi listen socket path\&. For TCP socket use 'IPv4:PORT' syntax ( '127\&.0\&.0\&.1:9000' by default)
- .RE
- .PP
- \fB-e --pymodule=MODULE_NAME\fP
- .RS 4
- python entrypoint module name
- .RE
- .PP
- \fB-E --pyapp=FUNC_NAME\fP
- .RS 4
- python entrypoint function name
- .RE
- .PP
- \fB-A --alt-io\fP
- .RS 4
- use stdout to communicate with web server instead of entrypoint return as specified in PEP333
- .RE
- .PP
- \fB-P --pid-file=PATH\fP
- .RS 4
- Create a pidfile with master process PID
- .RE
- .PP
- .SS "Worker pool OPTIONS"
- \fB-w --min-worker\fP
- .RS 4
- minimum worker in the pool
- .RE
- .PP
- \fB-W --max-worker\fP
- .RS 4
- maximum worker in the pool
- .RE
- .PP
- \fB-f --fast-spawn\fP
- .RS 4
- If not given there is at least 1s between two child creation\&. When given childs may be spawned in small burst\&.
- .RE
- .PP
- \fB-t --timeout=SECONDS\fP
- .RS 4
- Request timeout\&. If the timeout expires the worker process is restarted\&.
- .RE
- .PP
- .SS "Logging & monitoring OPTIONS"
- \fB-L --log=LOGGERSPEC\fP
- .RS 4
- Add a logfile using syntax 'LOGFILE[;FILT][;FMT]' See \fBLogfile format\fP
- .RE
- .PP
- \fB-S --syslog\fP
- .RS 4
- Use syslog for logging
- .RE
- .PP
- \fB-v --verbose\fP
- .RS 4
- Send all loglines on STDERR
- .RE
- .PP
- \fB-s --socket-server=SOCKURL\fP
- .RS 4
- Indicate a socket like 'tcp://localhost:8765' to listen on, replying status and statistics\&. See \fBStatistics socket URL format\fP
- .RE
- .PP
- .SH "Logfile format"
- .PP
- A logger specification use the following format : LOGILE[;FILT][;FMT] with
- .IP "\(bu" 2
- LOGFILE the logfile name
- .IP "\(bu" 2
- FILT a number (in decimal or hex 0xHH) indicating wich facility/level to log
- .IP "\(bu" 2
- FMT the logline format, following the markup format described bellow
- .PP
- .SS "Logline format"
- Logline's format is indicated using a simple format using fields between '{' and '}'\&. Supported fields are :
- .IP "\(bu" 2
- {datetime} {datetime:SIZE} {datetime:SIZE:FMT} defines a format and a constant length for a datetime field\&. Default : {datetime:25:F Tz}
- .IP "\(bu" 2
- {level} the loglevel
- .IP "\(bu" 2
- {facility} the log facility
- .IP "\(bu" 2
- {pid} the process PID
- .IP "\(bu" 2
- {ident} the process ident (friendly name)
- .IP "\(bu" 2
- {msg} the log message (can appear only once)
- .PP
- .PP
- Specials chars '{' & '}' can be escpaed using '{{' and '}}', and all field names can be abreviated to one character\&.
- .SH "Statistics socket URL format"
- .PP
- Statistics server listen on a socket specified by an URL like :
- .PP
- PROT://HOST:[PORT] with PROT one of :
- .IP "\(bu" 2
- tcp with HOST a valid INET address
- .IP "\(bu" 2
- udp with HOST a valid INET address
- .IP "\(bu" 2
- unix with HOST a valid PATH
- .PP
- .SH "EXAMPLES"
- .PP
- To run foo_pep333\&.entrypoint() PEP333 application :
- .PP
- spawn-fcgi -d \&. -n -p 9000 -a 127\&.0\&.0\&.1 -- src/pyfcgi -S -e foo_pep333 -E entrypoint
- .PP
- Logfile example :
- .PP
- spawn-fcgi -d \&. -n -p 9000 -a 127\&.0\&.0\&.1 -- src/pyfcgi -S -e foo_pep333 -E entrypoint -L '/tmp/foo\&.log;0xff;{datetime} {msg} {ident}'
- .SH "AUTHOR"
- .PP
- Written by Yann Weber <yann.weber@member.fsf.org>
- .SH "COPYRIGHT"
- .PP
- Copyright @ 2019 Yann Weber License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licences/gpl.html>\&.
- .PP
- This is free software: you are free to change and redistribute it\&. There is NO WARRANTY, to extent permitted by law\&.
- .SH "See Also"
- .PP
- \fBspawn-fcgi(1)\fP
- .PP
- PyFCGI git repositorie <https://git.yannweb.net/yannweb/pyfcgi>
|