Skip to content
Eddie Kohler edited this page Oct 17, 2017 · 7 revisions

click-install

installs a Click configuration into the kernel module driver

Synopsis

click-install [options] [param=value ...] [router-file]

Description

Click-install is a convenience program that installs a Click router configuration into the current Linux kernel. It reads a router configuration file in the click(5) language, installs the click.o(8) kernel module if necessary, compiles and/or installs any dynamically loadable packages required by the router configuration, installs the router configuration itself by writing it to /click/config, and uninstalls any unused packages. It reports any errors to standard error, including errors reported by the Click module, and returns a zero (true) exit status if and only if the configuration was successfully installed.

Options

Arguments such as "NAME=value" set configuration parameters, overriding any existing settings. Thus, "echo ’Message($MSG)’ | click-install MSG=Hi" will cause the kernel module to print "Hi".

If any filename argument is a single dash "-", click-install will use the standard input or output instead, as appropriate.

  • -f file

  • --file file

    Read the router configuration to transform from file. The default is the standard input.

  • -e expr

  • --expression expr

    Use expr, a string in the Click language, as the router configuration.

  • -h, --hotswap

    Hot-swap install the new configuration. If you supply this option, the new configuration will only be installed if it initializes correctly. If it fails, the old configuration will continue to route packets without interruption. Furthermore, state from the old configuration—such as packets contained in Queue(n) elements—will be swapped into the new configuration under certain conditions. See under /click/hotconfig in click.o(8) for details.

  • -u, --uninstall

    Uninstall and reinstall the Click kernel module. --hotswap and --uninstall are mutually exclusive.

  • -j, --threads=N

    The Click kernel module will run N threads per router. Click must have been build with --enable-multithread. This option only matters when click-install installs a Click kernel module. The thread count on an installed kernel module cannot be changed. (The --uninstall option is useful here.)

  • -n, --priority=N

    Set the Click kernel thread’s priority to N. Lower numbers have higher priority. A typical range for priority values is -20 (highest) to +19 (lowest). If you do not give a --priority option, then the current priority is left unchanged.

  • -G, --greedy

    The Click kernel module will claim an entire CPU, not allowing any other process to run. This option only matters when click-install installs a Click kernel module; the greediness of an installed kernel module cannot be changed. (The --uninstall option is useful here.)

  • -p, --private

    Make the /click directory hierarchy readable only by the owning user, which is usually root. Generally, files under /click are writable only by the owner, but readable by everyone. Works only when simultaneously loading a Click kernel module; see --uninstall.

  • -U, --user=USER[:GROUP]

    Set the user ID and group ID of the /click directory hierarchy to USER and group GROUP. By default USER and GROUP are both root. Works only when simultaneously loading a Click kernel module; see --uninstall.

  • --cpu=N

    Sets the Click thread to preferentially run on CPU N. If Click is running K threads, they are run preferentially on CPUs N up to, but not including, N + K. Thread affinities are ignored if they refer to unavailable CPUs. Works only when simultaneously loading a Click kernel module; see --uninstall.

  • -m, --map

    (Linux 2.4 only) If a Click kernel module is installed, write its load map to standard output. This can make it easier to debug kernel panics.

  • -V, --verbose

    Print information about each step in the install process, including the filenames of any installed modules.

  • --help

    Print usage information and exit.

  • --version

    Print the version number and some quickie warranty information and exit.

Exit Status

Click-install exits with one of the following return values:

  • 0

    The configuration was successfully installed.

  • 1

    Some error prevented click-install from attempting to install the configuration. For example, perhaps the configuration could not be parsed, or the kernel module could not be loaded.

  • 2

    The configuration was installed, but the kernel module reports that it could not be initialized.

See Also

click-uninstall(1), click(5), click.o(8)

Author

Eddie Kohler, [email protected]
http://www.pdos.lcs.mit.edu/click/

Clone this wiki locally