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.
mlagent [ options ]
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 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 It is highly recommended that case not be used to differentiate between Agent IDs. For example, do not create Agent ID Agent_XYZ and agent_xyz as different Agent IDs. When the consolidated database is case-insensitive, this recommendation is a requirement. When the consolidated database is case-sensitive, this recommendation is not enforced. |
-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 client network protocol options. These options 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 |
Test whether the Agent can synchronize. This option 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. For more information about ping synchronizations, see -pi dbmlsync option. 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. |
The following example demonstrates how to run the Agent in configuration mode. It uses the default Agent database and sets the agent ID to be the same as the MobiLink user ID:
mlagent -c -a username -u username -p password -x http{host=myhost.example.com;port=8080} -o logfile.mla |
The following example demonstrates how to run the Agent in normal mode, accepting all the settings from the default agent database:
mlagent |
Configuring the MobiLink Agent interactively
Stopping the MobiLink Agent
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |