= Run '''whisperer''' = ''See also: [wiki:whisperer/Configure Configure whisperer]'' '''whisperer''' is the application that is providing the encoded data to '''whisperCast'''. This document covers the command line flags and general file and directory configuration necessary for running '''whisperer'''. For information regarding the configuration, please visit the [wiki:whisperer/Configure Configure whisperer] document. Upon installation with '''make install''' (please check the [wiki:Install] document), several directories and a test/demo configuration is created. You can use that structure as a starting point, or you can use '''cpack''' to prepare a debian package to be installed on multiple of your servers. In that demo structure, you can look in '''$INSTALL_PREFIX/bin/start_whispercast.sh''' to see an example for starting '''whisperer''': {{{ #!sh $> $INSTALL_PATH/bin/whispershell.sh $INSTALL_PATH/bin/whispercast --flagfile=$INSTALL_PATH/whispercast/etc/ini/whisperer.ini }}} You may have noticed that a shell script is used to launch the demo - this is needed for every invocation of '''whisperer''', as a special environment must be set-up for '''whisperer''' to run properly (mainly related to the modified gstreamer '''whisperer''' uses). Also, the '''--flagfile''' flag is used to load the rest of the demo related flags. The ''whispershell.sh'' can be used to launch an interactive shell with all the environment set-up for '''whisperer''' and we strongly recommend you to use it while running and testing '''whisperer'''. Just launch: {{{ #!sh $INSTALL_PATH/bin/whispershell.sh }}} The command line flags are of great importance of how '''whisperer''' runs and behaves. You can get the long list of parameters by running {{{ #!sh $> whisperer --help }}} Here are the parameters, grouped by their category and their meaning. == Directories: == * '''-media_config_dir'''[[BR]]This is where the configuration files are placed (normally should be set to '''$INSTALL_PATH/'''whisperCast'''/etc/config'''). Must be unique for each '''whisperer''' instance.[[BR]][[BR]] * '''-media_state_dir'''[[BR]]Here '''whisperCast''' saves its state - a checkpoint and some log files (normally should be set to '''$INSTALL_PATH/'''whisperCast'''/var/state'''). Pair '''-media_state_dir''' / '''-media_state_name''' must be unique for each '''whisperer''' instance.[[BR]][[BR]] * '''-media_state_name'''[[BR]]'''whisperCast''' prefixes the state files with this identifier. Pair '''-media_state_dir''' / '''-media_state_name''' must be unique for each '''whisperer''' instance.[[BR]][[BR]] * '''-rpc_js_form_path'''[[BR]]If specified, we make RPC interface available via auto-generated forms, and we read the extra js sources from here (normally should be set to '''$INSTALL_PATH/'''whisperCast'''/var/www/js/rpc''')[[BR]][[BR]] == Basic network parameters: == * '''-http_port'''[[BR]]The port on which we accept HTTP connections (default: 8080). If you want to bind to the standard HTTP port (80) you may be tempted to start '''whisperer''' as root, which we '''strongly NOT advise'''. Alternately, you may run it on port 8080 and use [http://www.netfilter.org iptables] to map port 80 to port 8080 (of course, other solutions, that do not imply running '''whisperer''' as root, may also be available on your system).[[BR]][[BR]] * '''-http_max_num_connections'''[[BR]]We accept at most these many concurrent HTTP connections (default: 1000). NOTE: your system may have limits set for the number of file descriptors opened by user / process (usually 1024). If you increase this flag, make sure that you do not run into that limit (look for '''man ulimit''' and '''/etc/security/limits.conf''' file).[[BR]][[BR]] == Authorization: == * '''-admin_passwd'''[[BR]]The admin password for '''whisperer'''. We strongly encourage you to put this in a file and use ('''--flagfile''' option).[[BR]][[BR]] * '''-authorization_realm'''[[BR]]If you set an admin password, you also need this, as it is the realm returned for a failed basic-authentication HTTP request.[[BR]][[BR]] == Provider Configuration: == The ''providers'' are the actual components that provide media data to be delivered. * '''-max_lag'''[[BR]]The maximum allowed amount of data, in bytes, that a request can lag behind it's provider - this is needed to control how much memory can be allocated in case of slow clients.[[BR]][[BR]] * '''-publishing retry_timeout'''[[BR]]The timeout after a failed HTTP POST is retried, in milliseconds. If 0, there is no timeout, if -1 the POST will not be retried.[[BR]][[BR]] * '''-encoder_fireup_timeout'''[[BR]]The time to wait, in milliseconds, for an encoding pipeline to start running.[[BR]][[BR]] * '''-encoder_idle_timeout'''[[BR]]The time to keep an encoding pipelina alive, after it's last client has left, in milliseconds.[[BR]][[BR]] * '''-source_fireup_timeout'''[[BR]]The time to wait, in milliseconds, for a source pipeline to start running.[[BR]][[BR]] * '''-source_idle_timeout'''[[BR]]The time to keep a source pipelina alive, after it's last client has left, in milliseconds.[[BR]][[BR]] * '''-provider_link_soft_limit'''[[BR]]The lag, in miliseconds, after a multifdsink client in the stream provider will be resynced.[[BR]][[BR]] * '''-provider_link_hard_limit'''[[BR]]The lag, in miliseconds, after a multifdsink client in the stream provider will be disconnected.[[BR]][[BR]] == Other: == * '''-selector_high_alarm_precission'''[[BR]]Loose some CPU time and gain that extra mili-second precission for selector alarms. (default: false).[[BR]][[BR]] == Logging and Messages: == * '''-alsologtostderr'''[[BR]]If this is turned on, we also write log lines to this stderr (default: false).[[BR]][[BR]] * '''-logdir'''[[BR]]We write the log file under this directory. (default: "/tmp").[[BR]][[BR]] * '''-loglevel'''[[BR]]We initialize the log at this maximum level. (i.e. we log messages with levels less or equal then this). Levels: 0 - FATAL, 1: ERROR, 2: WARNING, 3: INFO, 5: DEBUG (lower - deep debugging) (default: 3 - INFO).[[BR]][[BR]] * '''-logtid'''[[BR]]Log the thread ID in each message (default: false).[[BR]][[BR]] * '''-logcolors'''[[BR]]If this is turned on, the log will use bash colors for log messages (default: false).[[BR]][[BR]] == Debugging: == * '''-loop_on_crash'''[[BR]]Causes the program to hang on bad signals waiting for your debugger. (default: false).[[BR]][[BR]] * '''-loop_on_exit'''[[BR]]If this is turned on, we loop before exiting (waiting for your debuger to attach) (default: false).[[BR]][[BR]] * '''-http_connection_dlog_level'''[[BR]]Turn on deep debugging messages on HTTP connections (default: false).[[BR]][[BR]] * '''-debug_check_long_callbacks_ms'''[[BR]]If greater than zero, we check (in debug mode only !) that processing functions, callbacks and alarm functions take less then this amount of time, in miliseconds) (default: 500).[[BR]][[BR]] == Help on Command Line Flags: == We use google flags library for our command line flags. These are flags offered by that library: * '''-help'''[[BR]]Show help on all flags [tip: all flags can have two dashes].[[BR]][[BR]] * '''-helpfull'''[[BR]]Show help on all flags -- same as -help).[[BR]][[BR]] * '''-helpmatch'''[[BR]]Show help on modules whose name contains the specified substr.[[BR]][[BR]] * '''-helpon'''[[BR]]show help on the modules named by this flag value.[[BR]][[BR]] * '''-helppackage'''[[BR]]Show help on all modules in the main package.[[BR]][[BR]] * '''-helpshort'''[[BR]]Show help on only the main module for this program.[[BR]][[BR]] * '''-helpxml'''[[BR]]Produce an xml version of help.[[BR]][[BR]] * '''-version'''[[BR]]Show version and build info and exit.[[BR]][[BR]] == Flags related to Flags: == We use google flags library for our command line flags. These are flags offered by that library: * '''-flagfile'''[[BR]]Load flags from file.[[BR]][[BR]] * '''-fromenv'''[[BR]]Set flags from the environment [use 'export FLAGS_flag1=value'].[[BR]][[BR]] * '''-tryfromenv'''[[BR]]Set flags from the environment if present.[[BR]][[BR]] * '''-undefok'''[[BR]]Comma-separated list of flag names that it is okay to specify on the command line even if the program does not define a flag with that name. IMPORTANT: flags in this list that have arguments MUST use the flag=value format).[[BR]][[BR]]