The mlreplay utility is a tool used to replay MobiLink protocol information that is recorded by the MobiLink server.
mlreplay [options] [name=value [name2=value2...]] [[dll_name] filename]
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. If you want to protect passwords or other information in the configuration file, you can use the File Hiding utility to obfuscate the contents of the configuration file. See File Hiding utility (dbfhide). |
-ap | Adjust the progress of synchronizations being replayed in a replay session so that the mlreplay utility does not cause progress offset mismatch warnings on the MobiLink server. |
-f time_scale_factor | A multiplier evenly applied to recorded times. |
-ldt last_download_time | Specify the last download time to send to the MobiLink server during the replay session. If the recorded protocol being replayed contains multiple synchronizations (this is possible if a persistent connection was recorded) only the first last download time is replaced; the rest will be replaced by the last download time the MobiLink server sends mlreplay during the replay session. Even if the -ldt option is not used, mlreplay replaces the last download time in all but the first synchronization with the last download time received from the MobiLink server during the replay session. A last download time can also be specified using the simulated client information file (when the -sci option is used) or by the IdentifySimulatedClient callback when a DLL is provided. |
-ls | Log the total running time, total time spent replaying, the total number of repetitions that either completed successfully, failed, or skipped for each simulated client. Note that mlreplay still logs this information before exiting even when this option is not specified. |
-n number_of_simulated_clients |
The number of simulated clients to run. The minimum is 1. This option can be used with the -sci option when the number of simulated clients specified by -n less than or equal to the number of simulated clients in the simulated client information file. When used together, -n specifies the number of simulated clients run. These options allow one simulated client information file, specifying x number of simulated clients, to replay a protocol with 1 to x simulated clients. |
-o file | Log command line options and output messages to the specified file. |
-os size | Limit the maximum size of a log file. When the log reaches the specified size (minimum 10 KB), it is renamed to YYMMDDxx.rlg and a new log file is started with the original name. |
-ot file | Truncate the log file. Log command line options and output messages to the specified file. |
-p password | Replace passwords with the given password. |
-ping seconds |
Ping a MobiLink server to determine whether or not the server is ready to receive synchronizations. By default, mlreplay pings the server for 60 seconds. If the -ping option is used, the following return codes are valid:
|
-r remote ID | Replace remote IDs with the given remote ID. This option cannot be used with the -rg option. |
-rep number_of_repetitions | Specify the number of times simulated clients should replay the recorded protocol. Each repetition can be customized if a replay DLL/shared object is used. When using the generated replay API, the GetUploadTransaction, GetDownloadApplyTime, ReportEndOfReplay, and DelayStartOfReplay callbacks are called for each repetition. |
-rg | Replace remote IDs with a GUID. |
-rnt seconds |
Instruct simulated clients to start new repetitions of protocol replays until the given number of seconds is reached. Note that simulated clients are not stopped but no additional repetitions are started. When specified, the numRepetitions parameter of any API callbacks is set to 0 |
-rp pattern | Replace the given pattern in usernames, passwords, and remote IDs specified on the command line with the simulated client number. |
-sci file |
Provide mlreplay with a list of user names, passwords, remote IDs, and last download times to use for replaying. mlreplay creates a simulated client for each line in the file to replay the recorded protocol with that client information. The format of each line should be: [username],[password],[remote ID],[last download time]. The format of the last download time should be yyyy-MM-dd hh:mm:ss.SSS. If the username, password, or last download time fields are left blank, mlreplay uses the corresponding values in the recorded protocol. If the remote ID is left blank, mlreplay replaces the remote ID with a GUID. Note that the -u, -p, -r, -rg and -ldt options cannot be used with this option nor can a DLL. This option can be used with the -n option when the number of simulated clients specified by -n less than or equal to the number of simulated clients in the simulated client information file. When used together, -n specifies the number of simulated clients run. These options allow one simulated client information file, specifying x number of simulated clients, to replay a protocol with 1 to x simulated clients. |
-u user name | Replace user names with the given user name. |
-x stream(opts) | The protocol stream and stream options to use to connect to the MobiLink server. |
Each recorded file is called a recorded protocol file. Everything received from the start of a connection until the end of that connection is recorded in a separate recorded protocol file. Each recorded protocol file is named recorded_protocol_x.mlr where x is the job ID. The MobiLink server -rp option is used to specify that the MobiLink server should record all MobiLink protocol it receives from its clients. See -rp mlsrv12 option.
In addition to the data sent to and from the MobiLink server, the recorded protocol file also contains timing information so that mlreplay can replay the recorded protocol information exactly as it was originally performed. The timing information is also used to try to make the simulated client take the same amount of time as the original client.
By default, mlreplay plays back the recorded protocol file without any changes. However, you can customize the replay session using different options. The simulated client information consists of the username, password, remote ID, and last download time. This information can be customized using the -u, -p, -r (or -rg), and -ldt options respectively.
The mlreplay utility can replay a recorded protocol file concurrently using the -sci simulated client information file option, where the simulated client information file is a .CSV file that lists the username, password, remote ID, and last download time for each simulated client. The mlreplay utility launches a simulated client for each simulated client information line in the simulated client information file.
The mlreplay utility can run multiple simulated clients to replay a protocol at the command line. The number of simulated clients to run can be specified by the -n option. Use the asterisk character to denote the simulated client number when specifying usernames, passwords and remote IDs with the -u, -p and -r options, respectively. The username, password and remote ID for each simulated client are determined by the following rules:
When a username or password is not specified, all simulated clients use the username or password recorded in the recorded protocol file being replayed.
When a remote ID is not specified and the number of simulated clients is greater than 1, each remote ID becomes an automatically generated GUID. When the number of simulated clients is 1, the remote ID recorded in the recorded protocol file is used; you can force a GUID value with the -rg option.
When the specified username, password, or remote ID does not contain an asterisk, simulated clients use the same username, password, or remote ID. When the specified username, password, or remote ID contains at least one asterisk, simulated clients get their own unique username, password, or remote ID where each asterisk is replaced with the simulated client number.
The amount of time the original synchronization took is part of what is recorded, so mlreplay can attempt to replay the synchronization in the same amount of time.
The mlreplay utility can replay a recorded protocol file multiple times concurrently.
Use the following MobiLink server options with the mlreplay utility:
-rp Use this option to specify the directory from which synchronizations are recorded for playback with the mlreplay utility.
-rrp Use this option to run the mlreplay utility when the MobiLink server starts.
-lsc Use this option to specify the connection information for the local server so the mlreplay utility can connect to the server.
Further customizations can be made to the replay session using the MobiLink Generated Replay API utility.
The callbacks that mlreplay is expected to load from the replay DLL must be exported using a module definition (.def) file when the replay DLL is linked.
Assume that you have a simulated client information file, mlreplay.csv, that specifies 100 simulated clients. The following example illustrates how to use the -sci and -n mlreplay options together to replay up to five of those simulated clients:
mlreplay -ap -x tcpip -sci mlreplay.csv -n 5 recorded_protocol_mlreplay_svr.mlr |
In the following example, you run multiple simulated clients at the command line:
mlreplay -ap -x tcpip -u user_$ -p password_$ -r remoteid_$ -n 5 -rp $ recorded_protocol_mlreplay_svr.mlr |
In this example, mlreplay runs two simulated clients. The first client is run with the user_1 username, password_1 password, and remoteid_1 remote ID. The second client is run with the user_2 username, password_2 password, and remoteid_2 remote ID. By default, the asterisk character is used to indicate the simulated client number in the -u, -p, and -r parameters. The -rp option overrides this pattern and instructs mlreplay to substitute the dollar sign character for the simulated client number.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |