Shut Down a Job Manager Cluster

If you are done using the job manager and its workers, you might want to shut down the server software processes so that they are not consuming network resources. You do not need to be at the computer running the processes that you are shutting down. You can run these commands from any machine with network access to the processes. The following sections explain shutting down the processes for different platforms.

Linux and Macintosh Operating Systems

Enter the commands of this section at the prompt in a shell.

Stopping the Job Manager and Workers

  1. To shut down the job manager, enter the commands

    cd matlabroot/toolbox/parallel/bin
    

    (Enter the following command on a single line.)

    stopjobmanager -remotehost <job manager hostname> -name 
    <MyJobManager> -v
    

    If you have more than one job manager running, stop each of them individually by host and name.

    For a list of all options to the script, type

    stopjobmanager -help
    
  2. For each MATLAB® worker you want to shut down, enter the commands

    cd matlabroot/toolbox/parallel/bin
    stopworker -remotehost <worker hostname> -v
    

    If you have more than one worker session running, you can stop each of them individually by host and name.

    stopworker -name worker1 -remotehost <worker hostname>
    stopworker -name worker2 -remotehost <worker hostname>
    

    For a list of all options to the script, type

    stopworker -help

Stop and Uninstall the mjs Daemon

Normally, you configure the mjs daemon to start at system boot time and continue running until the machine shuts down. However, if you plan to uninstall the MATLAB Parallel Server™ product from a machine, you might want to uninstall the mjs daemon also, because you no longer need it.

Note

You must have root privileges to stop or uninstall the mjs daemon.

  1. Use the following command to stop the mjs daemon:

    /etc/init.d/mjs stop
    
  2. Remove the installed link to prevent the daemon from starting up again at system reboot:

    cd /etc/init.d/
    rm mjs
    

Stop the Daemon Manually.  If you used the alternative manual startup of the mjs daemon, use the following commands to stop it manually:

cd matlabroot/toolbox/parallel/bin
mjs stop

Microsoft Windows Operating Systems

Stop the Job Manager and Workers

Enter the commands of this section at the prompt in a DOS command window.

  1. To shut down the job manager, enter the commands

    cd matlabroot\toolbox\parallel\bin
    

    (Enter the following command on a single line.)

    stopjobmanager -remotehost <job manager hostname> -name 
    <MyJobManager> -v
    

    If you have more than one job manager running, stop each of them individually by host and name.

    For a list of all options to the script, type

    stopjobmanager -help
  2. For each MATLAB worker you want to shut down, enter the commands

    cd matlabroot\toolbox\parallel\bin
    stopworker -remotehost <worker hostname> -name <worker name> -v
    

    If you have more than one worker session running, you can stop each of them individually by host and name.

    stopworker -remotehost <worker hostname> -name <worker1 name>
    stopworker -remotehost <worker hostname> -name <worker2 name>
    

    For a list of all options to the script, type

    stopworker -help

Stop and Uninstall the mjs Service

Normally, you configure the mjs service to start at system boot time and continue running until the machine shuts down. If you need to stop the mjs service while leaving the machine on, enter the following commands at a DOS command prompt:

cd matlabroot\toolbox\parallel\bin
mjs stop

If you plan to uninstall the MATLAB Parallel Server product from a machine, you might want to uninstall the mjs service also, because you no longer need it.

You do not need to stop the service before uninstalling it.

To uninstall the mjs service, enter the following commands at a DOS command prompt:

cd matlabroot\toolbox\parallel\bin
mjs uninstall