mps-service

Create or modify a Windows service for a server instance

Syntax

mps-service [-C [path/]server_name] create [--name name] [--description description] [--user user] [--password password] [--noprompt]
mps-service [-C [path/]server_name] update [--name name] [--description description] [--user user] [--password password] [--instance-root new_path] [--noprompt]
mps-service [-C [path/]server_name] delete
mps-service delete service_name [[--force]|[-f]]
mps-service clean [[--force]|[-f]][[--verbose]|[-v]]
mps-service [-C [path/]server_name] undelete
mps-service [-C [path/]server_name]
mps-service list

Description

mps-service [-C [path/]server_name] create [--name name] [--description description] [--user user] [--password password] [--noprompt] creates a Windows® service for the server instance.

The Windows service default settings are:

  • Service Display Name: MATLAB Production Server – path\server_name

  • Service Description: MATLAB Production Server running instance path\server_name

  • Service User: LocalSystem

The Windows service is configured to start when the machine starts, not at creation of the service. After you have made configuration changes, start the server instance using mps-start.

mps-service [-C [path/]server_name] update [--name name] [--description description] [--user user] [--password password] [--instance-root new_path] [--noprompt] updates the Windows service entry for the server instance.

mps-service [-C [path/]server_name] delete deletes the Windows service entry for the server instance.

mps-service delete service_name [[--force]|[-f]] deletes the Windows service entry by name.

mps-service clean [[--force]|[-f]][[--verbose]|[-v]] deletes invalid Windows service entries.

Invalid Windows service entries are entries where either the target version of MATLAB® Production Server™ is not present or the associated server instance no longer exists.

mps-service [-C [path/]server_name] undelete restores the deleted Windows service entry for the server instance.

mps-service [-C [path/]server_name] displays the Windows service entry for the server instance.

mps-service list lists the Windows service entries for all server instances.

Input Arguments

-C path/

Path to server instance

server_name

Name of the server instance

--name name

Display name for the Windows service associated with the server instance

--description description

Informational statement describing the Windows service associated with the server instance

--user user

Windows account under which the service associated with the server instance should run. The user account must have read, write, and, delete permissions for the instance directory as well read and execute permissions for the MATLAB Production Server installation directory.

--password password

Password for the service user account

--instance-root new_path

Updated path to server instance

--noprompt

Indicate that no prompts are generated

--force, -f

Force deletion without prompting

--verbose, -v

Include details about why the service is not valid.

Examples

Create a Windows Service

Create a default Windows service for the server instance server_1:

mps-service -C tmp/server_1 create

Delete a Windows Service

Delete the Windows service entry for the server instance server_1:

mps-service -C tmp/server_1 delete

List Existing Windows Services

List the Windows service entries for all the server instances installed on the local machine:

mps-service list
Service Name:  MATLAB Production Server {01234567-89ab-cdef-0123-456789abcdef}
Display Name:  MATLAB Production Server - My Custom Name
Description:   My Description
Instance Root: C:\instances\instance1
MPS Root:      C:\Program Files\MATLAB\MATLAB Production Server\R2014b
Status:        Started

Service Name:  MATLAB Production Server {01234567-89ab-cdef-0123-456789abcdef}
Display Name:  MATLAB Production Server - c:\instances\instance2
Description:   MATLAB Production Server running instance C:\instances\instance2
Instance Root: C:\instances\instance2
MPS Root:      C:\Program Files\MATLAB\MATLAB Production Server\R2015a
Status:        Stopped

Introduced in R2015a

Was this topic helpful?