Lesson 7: Configuring the Agent on the remote device

This lesson assumes you have completed all preceding lessons. See Lesson 1: Creating a consolidated database.

In this lesson, you run the MobiLink Agent. The MobiLink Agent must be running on each remote device that is centrally administered. For this tutorial, the Agent runs on the same computer where the MobiLink server is running.

 Configure the agent on the remote device
  1. Create a directory that contains the files that would normally be on the remote device.

    md c:\cadmin_demo\remote
    cd c:\cadmin_demo\remote
  2. Run the MobiLink Agent in configuration mode as follows:

    mlagent -cr -db . -x tcpip{host=localhost;port=2439} -a AID_JOHN  -u JOHN -p sql

    This step creates an agent database and stores some configuration information in it. Once the specified options are stored in the database, the Agent shuts down. Following is a summary of the options you used:

    • -cr   Specifies that the Agent should run in configuration mode and that it should discard any settings stored during previous runs in configuration mode.

    • -db   Specifies where the Agent should create application databases. This becomes the value of the {db_location} macro.

    • -x   Specifies how the Agent should connect to the MobiLink server to synchronize its agent database (to receive new tasks and upload results of tasks it has run). If you are adding central administration to an existing synchronization system, you need to change the value specified for this option to an appropriate string for connecting to your MobiLink server.

    • -a   Specifies the Agent ID for this Agent. You specified the same Agent ID that you previously created in the consolidated database using Sybase Central.

    • -u   Specifies the MobiLink user the Agent uses when synchronizing the agent database. This value is used by the MobiLink server primarily to authenticate the Agent.

    • -p   Specifies the password that goes with the MobiLink user specified with the -u option.

  3. Run the MobiLink Agent on the remote device. For this tutorial, you explicitly start the Agent running as follows:

    start mlagent -v9 -ot agent.txt

    Following is a summary of the options used to run the Agent in this lesson:

    • -v9   Uses maximum verbosity. Using this logging option is appropriate in a development environment. For performance reasons, -v9 is typically not used in a production environment.

    • -ot   Specifies the file where the Agent logs its output.

  4. You should now have the MobiLink Agent running and it should be synchronizing successfully. To check, return to Sybase Central. In the Folders view, under MobiLink 12 expand Central Admin Tutorial, Consolidated Databases, Tutorial, Agents. Select AID_JOHN and look at the Events tab in the right pane. You should see an entry that indicates the Agent's first synchronization.

    Note
    • Production considerations for Agent configuration   Keep the following considerations in mind when using central administration in a production environment:

      • You may need to change the values specified for the -u and -p options to an appropriate MobiLink user and password combination for your synchronization system.

      • You might want to use the -on option to limit the size of the log file produced by the Agent.

      • A remote device can only be remotely administered while the MobiLink Agent is running on it. You would likely want to take steps to ensure that the Agent is always running. Some strategies for this might include running the Agent as a service or adding the agent to the Run startup group in the registry.

  5. Proceed to Lesson 8: Creating a synchronization model.