Display path to server instance that is currently using the configured port


mps-which [-C [path/]server_name]


mps-which [-C [path/]server_name] is useful when running multiple server instances on the same machine. If you attempt to start two server instance on the same port, the latter server instance will fail to start, displaying an address-in-use error. mps-which identifies which server instance is using the port.

Input Arguments

-C path/

Specify a path to the server instance. If this option is omitted, the current working folder and its parents are searched to find the server instance.


Server to be queried for path.


server_1 and server_2, both residing in folder tmp, are configured to use to same port, defined by the http configuration property.

Run mps-which for both servers:

mps-which -C /tmp/server_1 
mps-which -C /tmp/server_2

Example Output

In both cases, the server that has allocated the configured port displays (server_1):



  • If you are creating a server instance in the current working folder, you do not need to specify a full path. Only specify the server name.

See Also

Introduced in R2012b