Command Line Arguments - pc2ccs/pc2v9 GitHub Wiki

The various PC2 modules (for example, the Server, the Admin, etc.) are invoked by executing one of several command scripts (see the section on Built-in Commands in the chapter on Startup Procedures). Each command script accepts a variety of command line arguments to control its operation.
(Every command script contains an invocation of a program named Starter; each script passes a specific set of command-line arguments to Starter. Any user-supplied command line arguments to the script are also passed to Starter.)

All arguments are preceded by double dashes, e.g. --xxx, where xxx is the name of the argument. Some arguments may be followed by parameters, some of which may be required while others are optional.

The following table lists the most commonly used command line arguments. Any arguments which are unrecognized, or which are not used by a given module, are silently ignored.

Argument Parameters Purpose
--help Displays a short usage message for the specified PC2 module.
--server Specifies that the PC2 module being started is a server. (This argument, for example, is automatically passed to Starter by the pc2server script.)
--login <accountId> Specify the PC2 account which is logging in.
--password <password string> Specify for the password for the PC2 account given by --login.
--ini <filename> Specify the name of an initialization/configuration file to be used in lieu of the standard pc2v9.ini file.
--skipini Instructs the PC2 module to ignore the contents of the pc2v9.ini file and use defaults for everything (not necessarily a good idea; for example, the "default" is to use localhost for all host names).
--profile Profile folder name Instruct a PC2 Server to use the specified (previously saved) profile.
--load Directory or filename Instructs a PC2 Server to load a contest configuration from either a directory in CLICS CDP format or from a specified YAML file. If the parameter does not contain a path, PC2 looks in its samps/contests folder for the specified contest name.
--nogui Start the specified module with no Graphical User Interface.
--port <integer> Instructs a PC2 Server to listen for connections on the specified port instead of the default (50002).
--remoteServer <IP address>[:port] Specifies that the PC2 Server being started is a remote site server and should connect to the primary server at the specified IP address (and, optionally, port). This overrides the remoteServer=xxx entry in the pc2v9.ini file.
--proxyme Specifies that the PC2 Server being started is requesting that the server to which it is connecting act as a proxy for all PC2 communications for this server. This argument is only useful when used immediately following a remoteServer <IP:port> argument. See the Appendix on Networking Constraints in the PC2 Administrator's Guide for additional information.
--first Indicates that the PC2 Server being started is the first (primary) server in a multi-site contest (this is the default in the absence of a --remoteServer <IP:port> argument.
--contestpassword <password string> Sets the "master contest password" when a PC2 Server is first started. Only useful on the first (primary) PC2 server.
-F <filename> Specifies the name of a file containing command line arguments/options (see below). Note that this option requires a single dash in front of the "F" .

The following table lists additional command line arguments which are recognized by certain modules. These are primarily special-purpose options used for testing, debugging, and tuning the system and are not normally used in regular contest environments.

Argument Parameters Purpose
--nologging Suppress all module logging. While this can save time, it is not recommended.
--nostandings Suppress the inclusion of the Standings and Standings HTML panes in those GUI displays which normally display these panes.
--addefjs Allows loading a set of submissions and judgements from a CLICS Event Feed.
--debug Runs the specified PC2 module in debug mode. Caution: this radically increases the amount of output sent to logs and consoles.
--noconnectionspane Suppress the inclusion of the Connections pane in those GUI displays which normally display this pane.
--nologinspane Suppress the inclusion of the Logins pane in those GUI displays which normally display this pane.
--ui Allows the user to specify an alternative class name to be used for the module UI.

Using the -F option

The -F command line option will load command line options from an input text file. This option is a security feature. Under most Unix systems the complete command line is listed when using a ps or similar command revealing login ids and passwords. Using the -F option, login ids and passwords can be stored in a text file. Note that the command line options are not limited to login and password options; any command line option can be stored in the specified text file.

If this command line was used:

pc2server --nogui --contestpassword cpass --login site1 --password site1pass

One could alternatively use the -F option:

pc2server -F secure.txt

where the secure.txt file contains

#

# Command line for non-GUI server

#

--nogui

--contestpassword cpass

--login site1

--password site1pass

Blank lines and lines starting with # are ignored in the file (secure.txt).

The order that command line values are applied (highest precedent first) are:

  1. specified -F option properties

  2. specified on the command line

  3. pc2v9.ini

⚠️ **GitHub.com Fallback** ⚠️