Configuring and running the MobiLink Agent on the client device

The Agent can be run in two modes: configuration mode and normal mode. In configuration mode, options specified on the command line are stored in the agent database for use during the next run in normal mode. Once the specified options are stored, the Agent terminates.

When run in normal mode, the Agent reads the configuration options stored in the agent database and remains running. While running it executes remote tasks it has received when appropriate and synchronizes the agent database at various times to receive new remote tasks and to upload results of remote tasks that it has run.

When run in normal mode, the Agent always attempts to do a synchronization at startup. This can be useful when you want to force the Agent to get up to date information from MobiLink.

 Syntax

To run in configuration mode, specify -c or -cr on the mlagent command line.

Option Description

@data

Use this to read in options from the specified environment variable or configuration file. If both exist with the same name, the environment variable is used. See Using configuration files.

-c

Set the configuration options, only updating those options that differ from the current options, then stop the Agent.

-cr

Set the configuration options, resetting all existing options to the defaults, then stop the Agent. Using this option resets all the information in the agent database and should only be used if the agent database is in an unrecoverable state.

-a agentid

Valid only with -c or -cr. Specify the ID of this Agent.

If the -a option is not specified, the default is Agent_computername_UUID, where computername is the host name of the machine that the Agent is running on and UUID is a universally unique identifier.

-db database location

Valid only with -c or -cr. Specify the path where remote databases are stored on the client device.

-x protocol[protocol-options] ...

protocol : tcpip | tls | http | https

protocol-options: ( option=value; ... )

Valid only with -c or -cr. Specify the MobiLink stream parameters. These parameters determine how the Agent connects to the MobiLink server when synchronizing the agent database.

-ap parameters

Specify the MobiLink authentication parameters used when synchronizing the agent database.

-ek key

Specify the encryption key used to access the agent database.

-n name

Specify the name of the agent database. The default is taskdb.

-o file

Log output to the specified file.

-on size

Append .old to the log file name and start a new file with the original name when the log reaches the size specified. Size must be a minimum of 10K. This option cannot be used with -os.

-os size

Rename the log file to YYMMDDxx.mla and start a new file with the original name when the log reaches the size specified. Size must be a minimum of 10K. This option cannot be used with -on.

-ot file

Truncate the file and log output messages to it.

-p password

Specify the MobiLink password used to synchronize the agent database.

-pi

Causes the Agent to do a ping synchronization of its Agent database with the MobiLink server, using the currently configured MobiLink client network protocol options and user authentication parameters. The mlagent process immediately returns 0 if the ping synchronization was successful, or the SQL error code of the synchronization request if the synchronization failed.

The MobiLink Agent database must be configured by running mlagent with -c or -cr before mlagent is invoked with -pi.

The MobiLink Agent cannot be invoked with both -pi and either -c or -cr on the command line.

-q

Run in a minimized window.

-qi

Do not display tray icon or window.

-u user Specify the MobiLink user name used to synchronize the agent database.
-vlevel

Specify the output verbosity level from 0-9. The default is 3.

 Example

Stopping the MobiLink Agent