fteModifyLogger: run an MFT logger as a Windows service

Use the fteModifyLogger command to modify a Managed File Transfer logger so that it can be run as a Windows service. We can use this command only on Windows platforms, and you must first stop the logger by using the fteStopLogger command.

Important: On IBM MQ for Multiplatforms, only users who are IBM MQ administrators (and members of the mqm group) can run this command. If you try to run this command as a user who is not an IBM MQ administrator, you will receive the error message BFGCL0502E: You are not authorized to perform the requested operation. and the command will not run. On z/OSĀ® systems, the user must satisfy (at least) one of these conditions in order to run the migrate command:

  • Be a member of the mqm group (if the mqm group is defined on the system).
  • Be a member of the group named in the BFG_GROUP_NAME environment variable (if one is named).
  • Have no value set in the BFG_GROUP_NAME environment variable when the command is run.


Purpose

A stand-alone logger, whether for a file or for a database, is shown as Managed File Transfer logger for property set logger_name@logger_qm in the Name column of the Services application. The value of logger_qm is the name of the command queue manager of the logger.


Syntax

fteModifyLogger

fteModifyLogger-loggerName (logger_name) -p configuration_ options
  • -n-s service_nameWindows systems options
  • Windows system options-su user_name -sp password
  • -sj options
  • -sl options

  • Parameters

      -loggerName (logger_name)
      Required. The name of the Managed File Transfer logger you want to modify.

      -p configuration_options
      Optional. This parameter determines the set of configuration options that is used to modify the logger. By convention use the name of a non-default coordination queue manager as the input for this parameter. The fteModifyLogger command then uses the set of properties files associated with this non-default coordination queue manager.

      Specify the optional -p parameter only if you want to use configuration options different from your defaults. If we do not specify this parameter, the set of configuration options based on the default coordination queue manager is used.

      -s service_name
      Optional. Indicates that the logger is to run as a Windows service. If we do not specify service_name, the service is named mqmftLoggerLOGGERQMGR, where LOGGER is the logger name and QMGR is your logger queue manager name.

      The display name for the service, which is shown in the Windows Services window in the Name column, is always Managed File Transfer Logger LOGGER@QMGR.

      -su or -serviceUser user_name
      Required when -s is specified. Specifies the name of the account under which the Windows service should run. To run the agent using a Windows domain user account, specify the value in the form DomainName\UserName. To run the service using an account from the local built-in domain, specify the value in the form UserName.

      The Windows user account that you specify using the -su parameter must have the permission to log on as a service. For information about how to grant this permission, see Guidance for running an MFT agent or logger as a Windows service.

      -sp or -servicePassword password
      Optional. Only valid when -s is specified. Password for the user account set by the -su or -serviceUser parameter.

      If we do not specify this parameter when you specify the -s parameter, you are warned that you must set the password by using the Windows Services tool before the service can start successfully.

      -sj or -serviceJVMOptions options
      Optional. Only valid when -s is specified. When the logger is started as a Windows service, this parameter defines a list of options in the form of -D or -X that will be passed to the JVM. The options are separated using the number sign (#) or semicolon (;) character. If you need to embed any # or ; characters, put them inside single quotation marks (').

      For more information about the way in which the fteModifyLogger command handles the validation of updates to the JVM options that are specified with the -serviceJVMOptions parameter, see Guidance for updating agent or logger JVM options.

      -sl or -serviceLogLevel options
      Optional. Only valid when -s is specified. Sets the Windows service log level. Valid options are: error, info, warn, debug. The default is info. This option can be useful if you are having problems with the Windows service. Setting it to debug gives more detailed information in the service log file.

      -n or -normal
      Optional. Indicates that the logger is to be run as a normal process. This is mutually exclusive with the -s option. If neither the -s nor the -n option is specified, then the logger is configured as a normal Windows process.

      -? or -h
      Optional. Displays command syntax.


    Example

    You must stop the logger by using the fteStopLogger command, before running the fteModifyLogger command.

    In this example, a logger named logger1 has previously been created. This command shows how the logger can be changed to run as a Windows service:
    fteModifyLogger -loggerName logger1 -s -su fteuser -sp ftepassword


    Return codes

      0
      Command completed successfully.

      1
      Command ended unsuccessfully.