Chapter 2. Master/Agent Startup and Shutdown

Table of Contents

2.1. Master Startup and Shutdown
2.1.1. Starting Master
2.1.2. Stopping Master
2.2. Agent Startup and Shutdown
2.2.1. Starting Agent
2.2.2. Stopping Agent

This chapter describes how to start and stop SysMaster's Master and Agent.

2.1. Master Startup and Shutdown

Check the following items before starting the Master.

  • Environment Configuration File

    Check that sysmaster.properties, Master's environment configuration file, exists in the following path.

    $SYSMASTER_HOME/config/ 

  • Start Command

    Check that smmaster, the command to start Master, exists in the following path.

    $SYSMASTER_HOME/bin/ 

2.1.1. Starting Master

SysMaster provides smmaster command to start Master. Master is started using the settings configured in the Master's environment configuration file.

  • Usage

    smmaster
  • Example

    $SYSMASTER_HOME/bin/smmaster

[Note]

To use Tomcat, check the following file for Master environment configuration.

$SYSMASTER_HOME/tomcat/bin/setenv.sh
$SYSMASTER_HOME/tomcat/conf/context.xml
$SYSMASTER_HOME/tomcat/conf/web.xml

2.1.2. Stopping Master

SysMaster provides smdown command to stop Master.

  • Usage

    smdown
  • Example

    $SYSMASTER_HOME/bin/smdown

2.2. Agent Startup and Shutdown

Check the following before starting the Agent.

  • Environment Configuration File

    Check that sysmaster.properties, Agent's environment configuration file, exists in the following path.

    $SYSMASTER_HOME/config/ 
  • Start Command

    Check that smagent, the command to start the Agent, exists in the following path.

    $SYSMASTER_HOME/bin/
  • Agent Registration

    Check that the Agent is registered with Master using the Web UI.

2.2.1. Starting Agent

SysMaster provides smagent command to start the Agent.

  • Usage

    The following is the smagent command syntax.

    smagent -n {agentname}
    OptionDescription
    agentnameName of the Agent to start.
  • Example

    The following is an example of using the smagent command.

    $ smagent -n APTEST

    The APTEST in the previous example is the name of the Agent that will be started. To execute the command, the Agent must be registered with Master through the Web UI. Refer to "Chapter 3. ADMIN" of this guide for information about the registration process.

When the previous command is executed, the following steps will be processed.

  1. Connects with Master to verify that the Agent has been registered.

  2. If the verification is successful, the latest binary files (*.jar) and environment configuration files (mbeans.xml, etc.) are downloaded to make sure that the versions of the Agent and Master are always updated together.

  3. Initializes the Agent.

    Initialization process includes initializing the resources that are registered with the Agent.

2.2.2. Stopping Agent

smagent command is used to start and stop the Agent.

  • Usage

    The following shows how to use smagent command to stop the Agent.

    smdown [-i | -n]
    OptionDescription
    -iImmediately stops the Agent without notifying the Master.
    -dStops the Agent after notifying the Master.
  • Example

    The following is an example of using smagent command to stop the Agent.

    $smdown –i
    Starting agent shutdown immediately...
    Agent shutdowned immediately...
    
    $smdown –n
    Starting agent shutdown...
       11:40:07 SMSTR INFO  Now starting stop agent server...
       11:40:07 SMSTR INFO  [SmNioClientManger] Finish SmNioClientManger Stop
       11:40:07 SMSTR INFO  [ReceiveWorker] Stop ReceiveWorker : R001
       11:40:07 SMSTR INFO  Trying to shutdown File job client
       11:40:07 SMSTR INFO  Destroy AGENT file job client success.
       11:40:07 SMSTR INFO  Destroy AGENT Sysmonadmin success.
       11:40:07 SMSTR.WAS INFO  [ReceiveWorker] Stop ReceiveWorker : R002
       11:40:07 SMSTR INFO  [ClientSendWorker] Stoped
       11:40:07 SMSTR INFO  [ClientRetryWorker] Stopped
     ....중간생략
       11:40:08 SMSTR INFO  Destroy AGENT PROVIDER mbeans.xml configurations.
       11:40:08 SMSTR INFO  Master Connector closed
       11:40:08 SMSTR INFO  SysMaster agent main stopped
       11:40:09 SMSTR INFO  Destroy MASTER registration
       11:40:09 SMSTR INFO  Destroy AGENT mbean server
       11:40:09 SMSTR INFO  Destroy AGENT Jrmpadaptor port [22100]
    Agent shutdowned...

    In the previous example, when -i option is used, the Agent shuts down without notifying the Master. When -d option is used, the Master is notified prior to shutting down the Agent.