Running as a Command-Line Daemon

In some circumstances, it may not be convenient to run ScaleOut StateServer as a service (daemon) on a Linux system. For example, running as a service requires root privileges, which may not be available. Also, you may need to run ScaleOut StateServer out of a different directory from its default installation directory.

You can run ScaleOut StateServer from the command line as a “command-line daemon” instead of as a system service, as follows:

  1. First, create a directory for running ScaleOut StateServer.

  2. Copy both parameters files (soss_params.txt and soss_client_params.txt) to this directory and create a symbolic link to the sossd executable program, for example:

    $ cp /usr/local/etc/soss_params.txt .
    $ cp /usr/local/etc/soss_client_params.txt .
    $ ln -s /usr/local/bin/sossd .
    

Note

By default, the StateServer service binds to ports 720-724. These

ports are considered privileged ports in most Linux systems, and cannot be bound to by a non-root user. These ports should be modified to use port numbers above 1024 when running without root privileges.

  1. Set the SOSS_HOME environment variable to that directory’s path.

  2. Run sossd with the -d flag in the background, for example:

    $ ./sossd -d &
    

When the StateServer service starts, it will print some initial messages to stdout before it becomes a daemon. Throughout its operation, it will also create trace log files in the directory specified by SOSS_HOME instead of in /var/log/soss.

Note

When sossd is run by a non-root user (or on Linux, any user without CAP_SYS_NICE), it will be unable to elevate certain important threads above normal priority. This may cause stability issues due to lack of responsiveness under very high CPU load. It should not be a problem under most circumstances.