Skip to content

66

Program to control the state of the system and service manager.

Interface

66 [ -h ] [ -z ] [ -v verbosity ] [ -l live ] [ -T timeout ] [ -t tree ] start|stop|reload|restart|free|reconfigure|enable|disable|configure|status|log|resolve|state|runstate|remove|signal|emit|env|snapshot|wall|tree|parse|scandir|fdholder|boot|poweroff|reboot|halt|suspend|hibernate|version [<command options> or subcommand <subcommand options>] service...|tree

Invocation of 66 can be made as root or regular account.

Options

These options are available for all commands except the -t option. In such cases, the help of the specific command provides clarification.

  • -h, --help: prints this help.

  • -z, --color: use color.

  • -v, --verbosity verbosity: increases/decreases the verbosity of the command.

    • 0: only print error messages.
    • 1: also, print informative messages. This is the default.
    • 2: also, print warning messages.
    • 3: also, print tracing messages.
    • 4: also, print function name and line code of the messages.
    • 5: also, display the sequence of the current process function by function.
  • -l, --live live: changes the supervision directory of service to live. By default this will be /run/66. The default can also be changed at compile time by passing the -D livedir= option to meson setup. An existing absolute path is expected and should be within a writable and executable filesystem - likely a RAM filesystem—see scandir command.

  • -T, --timeout timeout: specifies a general timeout (in milliseconds) passed to command. By default the timeout is set to 0 (infinite).

  • -t, --tree tree: set tree as tree to use.

Commands

User command

  • start: bring up services.
  • stop: bring down services.
  • enable: activate services for the next boot.
  • disable: deactivate services for the next boot.
  • reload: send a SIGHUP signal to services.
  • restart: bring down then bring up services.
  • status: display service information.
  • log: display service and system logs.
  • configure: manage service environment variables.
  • reconfigure: bring down, unsupervise, parse it again and bring up service.
  • remove: remove service and cleanup all files belong to it within the system.
  • free: bring down services and remove it from scandir.
  • emit: raise a user event to the event system.
  • env: publish per-session environment variables to services.
  • tree: manage or see information of trees.
  • poweroff: poweroff the system.
  • reboot: reboot the system.
  • halt: halt the system.
  • suspend: suspend the system to RAM.
  • hibernate: hibernate the system to disk.
  • version: display 66 version.

Admin command

  • boot: boot the system.
  • scandir: manage scandir.
  • fdholder: manage the scandir's fd holder daemon.
  • signal: send a signal to services.
  • wall: send message to connected users.
  • snapshot: manage snapshot.

Debug command

  • parse: parse the service frontend file.
  • resolve: display the service's resolve file contents.
  • state: display service's state file contents.
  • runstate: display the service's runtime status file contents.

Exit codes

  • 0 success
  • 100 wrong usage
  • 111 system call failed

Furthermore, all commands receive the same exit code.

Instanced service

An instanced service name from a service template can be passed as service argument where the name of the service must end with a @ (commercial at).—see frontend service file.

(!) The name of the template must be declared first immediately followed by the instance name.

For example, to enable an instanced service, you can do:

66 enable foo@foobar

Handling dependencies

Any dependency or required-by dependency of a service or a tree chain will be automatically resolved. Manually defining chains of interdependencies is unnecessary.

For instance, during the stop command, if the FooA service has a declared required-by dependency on FooB, FooB will be considered and automatically stopped first when FooA is stopped. This process will run recursively until all required-by dependencies are stopped. This is also valuable for the opposite process, meaning start.

This applies to all 66 commands when it's necessary.