Parameters

Table 2-1 describes the parameters to the Monitor Server start-up command.

Table 2-1: Monitor Server start-up command parameters

Parameter

Description

-E

Specifies that a new instance of Monitor Server should not start if a AdaptiveServerName.mrg file already exists (where AdaptiveServerName is the name specified in the -S parameter). Monitor Server creates the .mrg file at start-up, and it deletes the .mrg file during a graceful shutdown. If an .mrg file exists, it could mean either of the following:

  • An instance of Monitor Server for the Adaptive Server named in the -S parameter is already running.

  • An instance of Monitor Server for the Adaptive Server named in the -S parameter terminated ungracefully and could not delete its .mrg file.

The -E and -O options specify opposite behavior:

  • -E specifies that the new Monitor Server instance will not start if an .mrg file exists. You must manually delete the .mrg file. It is located in the same directory as the .krg file. See the -m option for details.

  • -O specifies that the new Monitor Server will start by overwriting the existing .mrg file.

The -O behavior is the default if neither -E nor -O are specified.

Use the -E option to ensure exclusive access to Adaptive Server by only one Monitor Server. Sites that give Monitor Server start-up permission to more than one user might prefer this option to prevent inadvertent duplicate start-ups.

Use the -O option to ensure that rebooting Adaptive Server and Monitor Server is successful after an ungraceful shutdown. Sites that depend on automatic start-ups using script files without operator intervention might prefer this option to prevent start-up script failures during reboots.

-iinterfacesFile

Specifies the path name of the connectivity file. This is the interfaces file on UNIX platforms and the sql.ini file on Windows NT. If this parameter is omitted, Monitor Server looks for the following default path name:

UNIX: $SYBASE/interfaces

Windows NT: %SYBASE%\sql.ini

-llogFile

Specifies the path name of the log file in which information and error messages are logged. The default is ms.log in the current directory.

-LconfigFile

Specifies the name of the Monitor Server configuration file. The configuration file is optional. If specified, the values in the file override default runtime parameters otherwise used by Monitor Server. For more information about the configuration file and Monitor Server runtime parameters, see “Adjusting Monitor Server runtime configuration”.

-MmonServerName

Required. Specifies the name of the Monitor Server to start.

-mkrgDirectory

Specifies the name of the directory where the Adaptive Server shared memory file (AdaptiveServername.krg) is located. If this parameter is omitted, Monitor Server looks for the shared memory file in the SYBASE directory.

The same shared memory file name must be specified or implied when starting Adaptive Server and Monitor Server. Therefore, the implicit or explicit values of the -M option for Adaptive Server and the -m option for Monitor Server must match.

-nmaxConnections

Specifies the maximum number of concurrent Open Client connections allowed to Monitor Server. Valid values are 1 through 20. The default is 5.

An Open Client connection to Monitor Server is any of the following:

  • A monitor in Sybase Central.

  • An active Historical Server recording session currently collecting data, regardless of when or how it was initiated.

  • A Historical Server recording session that has been defined but has not yet reached its start time.

  • A connection to Monitor Server from a Monitor Client Library application.

For example, if a Sybase Central user opens the Performance Summary Monitor and the Cache Statistics Monitor, that user has two Open Client connections to Monitor Server. If the default configuration of five connections is in effect, three additional connections to Monitor Server are available for that user or other users.

-O

Specifies that a new instance of Monitor Server should start by overwriting an existing AdaptiveServerName.mrg file (where AdaptiveServerName is the name specified in the -S parameter). Monitor Server creates the .mrg file at start-up, and it deletes the .mrg file during a graceful shutdown. If the .mrg file already exists, it could mean either of the following:

  • An instance of Monitor Server for the Adaptive Server named in the -S parameter is already running.

  • An instance of Monitor Server for the Adaptive Server named in the -S parameter terminated ungracefully and could not delete its .mrg file.

The -E and -O options specify opposite behavior. See the description of -E for more information.

-Ppassword

Specifies the password of the user specified with the -U option. If you do not want to explicitly store a password in a file, see the following notes for alternatives.

UNIX: If you omit this parameter, Monitor Server prompts for a password during start-up. To configure a Monitor Server start-up script to prompt for a password at start-up, make the following changes.

  • Remove the -P parameter and the ampersand (&) from the start-up script file.

  • Execute the Monitor Server start-up script file.

  • When prompted for a password, enter the password that is valid with the account you specified in the -U parameter.

  • Put the Monitor Server process in the background.

Windows NT: The Monitor Server installation process creates a user account mon_user. If you omit both the -U and -P parameters, the mon_user account is the default superuser account. If the mon_user account has been deleted from the Adaptive Server, and you use the NT start-up services to start Monitor Server, both the -U and -P parameters are required in the NT Registry entry. In a Monitor Server .bat start-up file, you can omit the -P option, and Monitor Server prompts for the password during start-up.

-p

Applies to Windows NT only. Sets the execution priority of Monitor Server to high priority. Use this parameter only if you set the Adaptive Server priority to high. The execution priorities for Adaptive Server and Monitor Server must match.

-SAdServerName

Required. Specifies the name of Adaptive Server to monitor. Must match the value used in the -s parameter in the Adaptive Server start-up command.

-T0

-T1

-T0 specifies that error messages received from Adaptive Server are not printed.

-T1 specifies that Monitor Server does not shut itself down when Adaptive Server shuts down. In general, Sybase does not recommend this parameter for production environments. By default, Monitor Server periodically checks to see if Adaptive Server is down and shuts itself down when it detects that Adaptive Server is down. See “Heartbeat interval” for more information.

To activate both of the conditions, use two -T arguments in your command:

-T0 -T1

-Uusername

Specifies the user name of the Monitor Server superuser. The name, along with the password provided with the -P parameter, must be a valid login account in the Adaptive Server being monitored. It must have permission to execute the master..mon_rpc_attach stored procedure installed in the Adaptive Server being monitored.

Monitor Server uses the superuser account in the following ways:

  • To connect to Adaptive Server to run the mon_rpc_attach stored procedure and to determine the location and attributes of Adaptive Server shared memory.

  • To verify shutdown requests. The superuser and the “sa” user are the only accounts allowed to shut down the Monitor Server.

UNIX: This parameter is required unless the $USER environment variable is set. If $USER is set and you omit the -U and -P parameters, Monitor Server prompts for the password associated with $USER during start-up. Sybase recommends that you use the “sa” or “sybase” user account as the Monitor Server superuser.

Windows NT: This parameter is optional if the “mon_user” account exists in the Adaptive Server being monitored. The Monitor Server installation procedure creates the “mon_user” account, and Monitor Server uses it as the default Monitor Server superuser when the -U parameter is omitted. If the “mon_user” account is deleted from Adaptive Server, the -U parameter is required.

-v

Displays the Monitor Server version string and exits. When this parameter is used, all other parameters are ignored.