def usage (): sys.stdout.write('usage:\n exaproxy [options]\n') sys.stdout.write('\n') sys.stdout.write(' -h, --help : this help\n') sys.stdout.write(' -c, --conf-file : configuration file to use (ini format)\n') sys.stdout.write(' -i, -fi, --ini : display the configuration using the ini format\n') sys.stdout.write(' -e, -fe, --env : display the configuration using the env format\n') sys.stdout.write(' -di, --diff-ini : display non-default configurations values using the ini format\n') sys.stdout.write(' -de, --diff-env : display non-default configurations values using the env format\n') sys.stdout.write(' -d, --debug : shortcut to turn on all subsystems debugging to LOG_DEBUG\n') sys.stdout.write(' -p, --pdb : start the python debugger on serious logging and on SIGTERM\n') sys.stdout.write(' -m, --memory : display memory usage information on exit\n') sys.stdout.write('\n') sys.stdout.write('ExaProxy will automatically look for its configuration file (in windows ini format)\n') sys.stdout.write(' - 1 : in etc/exaproxy/exaproxy.conf (relative position within the extracted tgz file)\n') sys.stdout.write(' - 2 : in /etc/exaproxy/exaproxy.conf\n') sys.stdout.write(' - 3 : in /usr/etc/exaproxy/exaproxy.conf\n') sys.stdout.write('\n') sys.stdout.write('You can generate the configuration file using the -i, or -fi, option') sys.stdout.write('Every configuration value has a sensible built-in default\n') sys.stdout.write('\n') sys.stdout.write('Individual configuration options can be set using environment variables, such as :\n') sys.stdout.write(' > env exaproxy.dns.timeout=20 ./sbin/exaproxy\n') sys.stdout.write('or > env exaproxy_dns_timeout=20 ./sbin/exaproxy\n') sys.stdout.write('or > export exaproxy_dns_timeout=20; ./sbin/exaproxy\n') sys.stdout.write('\n') sys.stdout.write('Multiple environment values can be set\n') sys.stdout.write('and the order of preference is :\n') sys.stdout.write(' - 1 : command line env value using dot separated notation\n') sys.stdout.write(' - 2 : exported value from the shell using dot separated notation\n') sys.stdout.write(' - 3 : command line env value using underscore separated notation\n') sys.stdout.write(' - 4 : exported value from the shell using underscore separated notation\n') sys.stdout.write(' - 5 : the value in the ini configuration file\n') sys.stdout.write('\n') sys.stdout.write('The following UNIX signal are acted on :\n') sys.stdout.write(' - SIGUSR1 : decrease the maximum number of processes\n') sys.stdout.write(' - SIGUSR2 : increase the mininum number of processes\n') sys.stdout.write(' - SIGTTOU : stop listening for new proxy connections\n') sys.stdout.write(' - SIGTTIN : start listening for new proxy connections\n') sys.stdout.write(' - SIGQUIT : stop listening and exit when exiting connections are all closed\n') sys.stdout.write(' - SIGTERM : terminate the program immediatly (SIGINT too atm)\n') sys.stdout.write('\n') sys.stdout.write('Valid configuration options are :\n') sys.stdout.write('\n') for line in default(): sys.stdout.write(' - %s\n' % line) sys.stdout.write('\n')