Starting Remote Services as a Service

While you always have the option of running grb_rs from a terminal and leaving the process running in the background, we recommended that you start it as a service instead, especially in a production deployment. The advantage of a service is that it will automatically restart itself if the computer is restarted or if the process terminates unexpectedly.

grb_rs provides several commands that help you to set it up as a service. These must be executed with administrator privileges:

grb_rs install
Install the service. The details of exactly what this involves depend on the host operating system type and version: this uses systemd or upstart on Linux, launchd on MacOS, and Windows services on Windows.
grb_rs start
Start the service (and install it if it hasn't already been installed).
grb_rs stop
Stop the service.
grb_rs restart
Stop and then start the service.
grb_rs uninstall
Uninstall the service.

Note that the install command installs the service using default settings. If you don't need to modify any of these, you can use the start command to both install and start the service. Otherwise, run install to register the service, then modify the configuration (the details are platform dependent and are touched on below), and then run start the service.

Note that you only need to start the service once; grb_rs will keep running until you execute the grb_rs stop command. In particular, it will start again automatically if you restart the machine.

Note also that the start command does not take any flags or additional parameters, and that all the configuration properties must be set in the grb_rs.cnf configuration file. If you need to make a change to the configuration, use the command stop then the command start in order to restart grb_rs with the updated configuration. The one exception is the JOBLIMIT property, which can be changed on a live server using grbcluster. If you change this property and restart the server, the new value will persist and the value in the configuration file will be ignored.

The exact behavior of these commands varies depending on the host operating system and version.

Linux

On Linux, grb_rs supports two major service managers systemd and upstart. The install command will detect the service manager available on your system and will generate a service configuration file located in /etc/systemd/system/grb_rs.service or /etc/init/grb_rs.conf for systemd and upstart, respectively. Once the file is generated, you can edit it to set advanced properties. Please refer to the documentation of systemd or upstart to learn more about service configuration.

Use the start and stop commands to start and stop the service. When the service is running, the log messages are sent to the Linux syslog and to a rotating log file, service.log, located in the same directory as grb_rs.

The uninstall command will delete the generated file.

Mac OS

On Mac OS, the system manager is called launchd, and the install command will generate a service file in /Library/LaunchDaemons/grb_rs.plist. Once the file is generated, you can edit it to set advanced properties. Please refer to the launchd documentation to learn more about service configuration.

Use the start and stop commands to start and stop the service. When the service is running, the log messages are sent to the Mac OS syslog and to a rotating log file, service.log, located in the same directory as grb_rs.

The uninstall command will delete the generated file.

Windows

On Windows, the install command will declare the service to the operating system. If you wish to set advanced properties for the service configuration, you will need to start the Services configuration application. Please refer to the Windows Operating System documentation for more details.

Use the start and stop commands to start and stop the service. When the service is running, the log messages are sent to the Windows event log and to a rotating log file, service.log, located in the same directory as grb_rs.

The uninstall command will delete the service from the registery.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search