Chapter 2. Commands

Table of Contents

2.1. cfl
2.2. etmm/eclh
2.3. fdlc
2.4. gst
2.5. mkacl
2.6. mkcli
2.7. mkgrp
2.8. mkpw
2.9. mksvr
2.10. racd
2.11. racdr
2.12. sdlc
2.13. svcrpt
2.14. tdlclean
2.15. tdlinit
2.16. tdlnm
2.17. tdlrm
2.18. tdlshm
2.19. tdlsync
2.20. tdlupdate
2.21. tencrypt
2.22. tmadmin
2.23. tmapm
2.24. tmaxlibver
2.25. tmaxtrace
2.26. tmboot
2.27. tmd
2.28. tmdown
2.29. tmmbfgen
2.30. tmsnmpd
2.31. tperr
2.32. uncfl
2.33. untmmbfgen
2.34. xwsdlgen

This chapter describes commands available in Tmax.

2.1. cfl

To run a program, a Tmax configuration file must be defined and its validity verified. The cfl command compiles a Tmax text configuration file and converts it into a binary configuration file with a default name of <tmconfig>.

If an error occurs during compilation of the configuration file, compilation will stop and a binary configuration file will not be created. The binary file is used by gst, tmboot, tmdown, and other commands. To compile a text configuration file of a particular node in a multi-node environment, use the [ -n node_name ] option.

The following figure shows a multi-node monitoring environment:

[Figure 2.1] Multi-node Monitoring Environment

Multi-node Monitoring Environment

  • Usage

    $ cfl [-i text Tmax configuration file name] [-o binary Tmax configuration file name]
          [-h] [-V] [-n node_name] [-A] [-v num] [-I] [-r][-x]
    OptionDescription
    [ -i text Tmax configuration file name ]

    The name of a Tmax text configuration file to be compiled. The path to the file can also be specified. If a path is not specified, the $TMAXDIR/config directory will used. If the configuration file cannot be found, an error message will be displayed.

    [ -o binary Tmax configuration file name ]The name of an output binary Tmax configuration file. The path to the file can also be specified. If a path is not specified, the $TMAXDIR/config directory will be used. If this option is omitted, an output binary file will be named <tmconfig>.
    [ -h ]Shows command Help.
    [ -V ]Shows the version of an executable file.
    [ -n node_name ]Used to compile a configuration file of a specific node in a multi-node environment. To manage another node in this environment, set a racd.
    [ -A ]

    Valid only when service access control (3-level security) is used.

    Distributes $TMAXDIR/config/group, acl, and user files of a current node to the $TMAXDIR/config directory of other nodes in the same domain because access rights to the ACL service within a domain must be applied to all nodes.

    Before using this option, group, acl, and user files must be created in advance using mkgrp, mkpw, and mkacl. Because the created files are used by all nodes in a domain, all users in the domain must be considered. group_name, group_id, user_name, and user_id must be unique in a domain.

    Because a password file is not distributed with this option, the file is required to be created in each node or copied to each node.

    [ -v num ]

    Input options:

    • 0: num is set to 0 when all nodes in a multi-node environment have the same machine type and an administrator manages a separate configuration file for each node. The compiled binary file is copied to each machine and managed there.

    • 1: The configuration file is automatically compiled with a racd. This is the default value.

    [ -I ]If the value set in a SHMKEY in the DOMAIN section of a configuration file is used when a cfl command is executed, the UID of the current value will be compared with a specified value. If the values do not match, an error will occur.
    [ -r ]

    Informs users of the maximum number of FDs available in a system, which is displayed by ulimit -n while using a cfl. This option checks the maximum number of FDs that can be opened by a CLH.

    (I) CFL9991 Current Tmax Configuration: Number of client handler(MINCLH) = 2  
    Supported maximum user per node = 1380 
    Supported maximum user per handler = 691 [CFL5065] 

    If the number of FDs used in a Tmax system is greater than a configured value, the following error will occur.

    (E) CFL9990 Current Tmax configuration contains more servers or nodes than current system can support[CFL5056]

    [-a Tmax configuration file name ]An option to dynamically add a Tmax configuration file. If a file is dynamically added without this option, an (E) ADM2048 error will occur. For more information, refer to "5.5.6. cfgadd(ca) in "Tmax Administrator's Guide."
    [ -Z ]

    Option to remove the limit to a MAXSACALL/MAXCACALL, which is set to 1024 by default.

    (e.g., - cfl -Z -i sample.m)

    [ -x ]

    Checks whether a server or service name exists when an -x option is used for a TARGET and a CLOPT in the SERVER section of a configuration file. If this option is used when a server or service exists, a cfl will be successfully handled but the following errors will occur when a Tmax system starts.

    (E) CFL3184 line %d(line in which the server is declared): invalid target server name %s(server name specified in TARGET)
    (E) CFL3183 line %d(line in which the server is declared): invalid service name %s(service name specified using -x)

  • Environment

    This command can be used in a system with a Tmax system installed.

  • Examples

    • The following compiles a text Tmax configuration file named <basic> in /user1/tmax/temp into a binary file named <tmconfig> in a current directory.

      $ cfl -i /user1/tmax/temp/basic
    • The following compiles a text Tmax configuration file named <ex_config> in the default directory into a binary file named <tmconfig> in /user1/tmax/bin.

      $ cfl -i ex_config -o /user1/tmax/bin/tmconfig

Note

For more information about gst, tmboot, and tmdown, refer to "2.4. gst", "2.26. tmboot", and "2.28. tmdown" respectively.

2.2. etmm/eclh

Using more FDs with an event-based communication method rather than with an existing communication method increases performance. The event-based etmm and eclh commands can be replaced by the tmm and clh commands, respectively, in a $TMAXDIR/bin. The environments that can support the commands differ depending on the platform used.

  • Environment

    Check the supporting environments for each platform.

    PlatformSupporting Environment
    HP-UX, SUN Solaris/dev/poll
    Linuxepoll
    IBM AIX 5.3pollset

Caution

Event-based tmm and clh are not included in a Tmax 5 default binary. Submit a request to TmaxSoft to use those commands.

2.3. fdlc

Unlike the method for transferring a structure in data communication between server and client, the field key method transfers only required items. To transfer an item, a unique key that identifies an item is required. The fdlc command compiles a text field key table to create the unique field keys.

  • Usage

    $ fdlc {-a|c|d|u} [-f] [-h header file name] {-i field key table file name} 
           [-jc|ji] [-o result name] [-p package name] [-x] [-r output file name][-V]
    OptionDescription
    { -a }Compiles a text field key table and adds required sections to a binary file. A target file can be specified with the [-f] option. The default file is <tmax.fdl>. A duplicate field is replaced with a new value.
    { -c }Compiles a text field key table into a binary file. If a binary file already exists, it is overwritten with new content. This is the default option.
    { -d }Compiles a text field key table and removes required sections from a binary file. A target file can be specified with the [-f] option. The default file is <tmax.fdl>.
    { -u }Compiles a text field key table and adds or modifies required sections in a binary file. A target file can be specified with the [-f] option. The default file is <tmax.fdl>.
    [ -f ]A target file. Used with the {-a}, {-d}, or {-u} options.
    [ -h header file name ]Renames a header file. If this option is not used, a fdl header file name will be <field key table name_fdl.h>.
    { -i field key table file name }A file that defines a field key table to be used by a client and server programs. This option is mandatory. A path also can be specified.
    [ -jc|ji ]

    A field definition class type to be created. Used in WebT. Input options:

    • ji: The interface type of a field definition class file.

    • jc: The class type of a field definition Java file.

    [ -o result name ]Renames a result file. If this option is not used, a fdl file name will be <tmax.fdl>.
    [ -p package name ]The package name of a created field definition class. Used in WebT.
    [ -x ]Maintains original values for duplicate fields. Must be used with the [-a] option.
    [ -r output file name ]Converts a binary file into a text file. This option must be used with the [ -f fdl file name ] option.
    [ -V ]Shows the version of an executable file.
  • Environment

    This command is supported in UNIX and MS-DOS.

  • Examples

    • The following creates a Java file with a [-jc|ji] option.

      'number' can be between 0 and 16,777,215.

      <demo.f>

      #demo.f
      #name   number  type    flags   comments
      INPUT   101     string  -       -
      OUTPUT  102     string  -       -
      $> fdlc -c -i demo.f -ji -jc webtdemo
    • The following is the content of a <demo_fdl.java> file.

      package webtdemo;
      public interface demo_fdl {
          public int INPUT = (469762149);    /* number: 101 type: string */
          public int OUTPUT = (469762150);  /* number: 102 type: string */
      }
    • The following compiles a <demo.f> field key table in a current directory. <tmax.fdl> and <demo_fdl.h> are created, and <demo_fdl.h> is a header file in which a field key is defined.

      $ fdlc -c -i demo.f
    • The following changes a binary fdl file into a text file. The field key table defined in a <tmax.fdl> is created in a <tmax_text.f> file as a text file after execution.

      $ fdlc -f tmax.fdl -r tmax_text.f

Field Key

A FDL method is used to send data using a field key buffer in server and client data communication. A Field Definition Language (FDL) exchanges data between processes with a field key buffer. The field key buffer has an identifier and data value pair that corresponds to the identifier. The identifier is created by a combination of a unique identification number and a data type. The identifier is a field key.

For readability, a field name is used instead of a field key in an application. Each field name is converted into a field key by referring to a binary field key file and then saved in a buffer.

In the FDL method, a field type and length can be used without modifying programs that use the field. Data types supported in the C language, such as Char, Short, Integer, Long, Float, Double, String, and Carray, can be used. The length of a field name can be up to 16 characters.

The fdlc compiler compiles a text field key definition file into a binary file. Field keys are referenced by a user program. A field key definition file is a text file, and the extension of a table file must be .f. If a compilation is successful, <tmax.fdl> and <field key definition file name_fdl.h> will be created. A server program can save and read field data after a program is compiled by referring to a created header file. A client must register a file created with a fdlc command in a FDLFILE configuration variable.

One advantage of a field key buffer is that it is data independent. When a structure buffer is used, the entire structure buffer is sent even if it contains unused fields. However, in a field key buffer, fields can be selected and sent. In addition, various field key manipulation functions are supported to improve development productivity.

Note

For more information about field key manipulation functions, refer to "Tmax FDL Reference Guide".

2.4. gst

The gst command creates a service table for servers by referring to the SERVER and SERVICE sections in a binary Tmax configuration file created by a cfl command. The table is a list of services provided by a server process. It is written and compiled with a server program and used to find the location of a service while a server process runs.

Successful execution of this command results in a <server name_svctab.c> file being created in the svct directory under a specified TMAXDIR directory (see the NODE section in the source configuration file). The server name will be the name set in the SERVER section, and the contents of each file will be service names provided by the corresponding server set in the SERVICE section.

Services set in a Tmax configuration file must be set in the service table of a corresponding server. If there are any changes to a server name, service name, or SVRNAME of a service in the SERVER or SERVICE section of a Tmax configuration file, the service table and the server program must be recompiled with a gst command.

  • Usage

    $ gst [-f binary Tmax configuration file name | -v server_name | -h | -n node_name | -V]
    OptionDescription
    [ -f binary Tmax configuration file name ]A binary Tmax configuration file to be used. The binary configuration file is the result of executing a cfl command and is referenced by tmboot and tmdown. The path to the file can also be specified. If a path is not specified, the <tmconfig> in the $TMAXDIR/config directory will be used.
    [ -v server_name ]A service table that corresponds to a server name.
    [ -h ]Shows command Help.
    [ -n node_name ]In a multi-node environment, this option creates a service table of another node's server process in the $TMAXDIR/svct directory of the current node.
    [ -V ]Shows the version of an executable file.
  • Environment

    This command can be used in a system with a Tmax system installed.

  • Example

    The following is an example of creating a service table for each server by referring to a <exconfig> configuration file in a /user1/park/tmax/bin directory.

    $ gst -f /user1/park/tmax/bin/exconfig

    In the following configuration file, service tables named <svr1_svctab.c> and <svr2_svctab.c> are created in the /user1/park/tmax/bin directory.

              ….
    *SERVER
    svr1         SVGNAME = svg1
    svr2         SVGNAME = svg1
    *SERVICE
    svc1         SVRNAME = svr1
    svc2         SVRNAME = svr2 

Note

For more information about cfl, tmboot, and tmdown commands, refer to "2.1. cfl", "2.26. tmboot", and "2.28. tmdown".

2.5. mkacl

Service access rights (3-level security) are controlled by user groups. A service can be accessed by a user in a group that has permission to access the service. To access the service, a group file, a user file included in the group, and an acl file that specifies user groups with service access permission must be created. To create a acl file, use a mkacl command.

  • Usage

    $ mkacl [-a] [-d] [-G group_name] [-t type] [-s service_name] [-h] [-V]
    OptionDescription
    [ -a ]Adds a new acl service to an existing acl file. If an acl file already exists, the new service will be added to the end of the file. If no acl file exists, a new acl file will be created and the new service will be added to the file.
    [ -d ]Deletes a acl service specified by a [-s] option from an acl file. This option must be specified with [-G], [-s], and [-t] options, and the [-G] option must correspond with the service.
    [ -G group_name ]The name of a group allowed to access a service specified with a [-s] option. The name must be specified in $TMAXDIR/config/group.
    [ -t type ]An acl type. Only a 'SERVICE' is currently supported.
    [ -s service_name ]A service to which an acl is applied. The service can be accessed only by a user in a single server group specified with a [-G] option.
    [ -h ]Shows command Help.
    [ -V ]Displays the Tmax version.
  • Result

    A $TMAXDIR/config/acl file is created, and the type and contents are as follows:

    service_name:type:group_id

    TOUPPER1:SERVICE:1
    TOUPPER5:SERVICE:5
    TOUPPER7:SERVICE:7
    TOUPPER9:SERVICE:9

Note

To use this command in multiple nodes, see the [-A] option in "2.1. cfl".

2.6. mkcli

The mkcli command creates a Tmax client module with a cc compiler. All options must be specified within 1024 characters.

  • Usage

    $ mkcli {-o outfile} {-f firstfiles} [-v] [-l lastfiles] [(-32)|-64] [-V] 
            [-u UserCompileOption]
    OptionDescription
    { -o outfile }A client module name.
    { -f firstfiles }If a user definition file is specified, the file will be linked and compiled before a client library provided by Tmax is compiled. A user definition file usually specifies a client program.
    [ -v ]Displays the progress of a compilation in the verbose mode in a console.
    [ -l lastfiles ]If a user definition file is specified, the file will be linked and compiled after a client library provided by Tmax is compiled. A user definition file usually specifies a client program.
    [ (-32) | -64 ]

    Specifies whether a client module to be created is 32 bit or 64 bit.

    • [-32]: A Tmax library path is set to $TMAXDIR/lib. This is the default value.

    • [-64]: A Tmax library path is set to $TMAXDIR/lib64.

    [ -V ]Shows the version of an executable file.
    [ -u UserCompileOption ]

    Replaces default compilation options for a platform specified by a mkcli command with user-defined compilation options. Be aware that options related to libraries and included files are not applicable.

    To specify two or more options, use whitespace as a delimiter.

    (e.g., -u opt1 opt2)

  • Environment

    This command can be used in a system with a Tmax system installed.

2.7. mkgrp

Service access rights (3-level security) are controlled by user groups. A service can be accessed by a user in a group that has permission to access the service. To access the service, a group file, a user file included in the group, and an acl file that specifies user groups with service access permission must be created. To create a group file, use a mkgrp command.

  • Usage

    $ mkgrp {-a} {-G group_name} {-g group_id} [-d] [-h] [-V]
    OptionDescription
    { -a }

    Adds a new user group to an existing group file. If a user group file already exists, the new group will be added to the end of the file. If no user group file exists, a user group file will be created and the new user group is added to the file.

    { -G group_name }The name of a group to be created. The name must be unique.
    { -g group_id }The ID of the group to be created. The ID must be unique.
    [ -d ]Deletes a group with an ID specified by a {-g} option. This option must be specified with {-G} and {-g} options.
    [ -h ]Shows command Help.
    [ -V ]Displays the Tmax version.
  • Result

    A $TMAXDIR/config/group file is created, and the type and contents are as follows.

    Group_name:x:Group_id

    grp1:x:1
    grp2:x:2
    grp3:x:3
    grp4:x:4
    grp5:x:5
    grp6:x:6
    grp7:x:7
    grp8:x:8
    grp9:x:9
    grp10:x:10

2.8. mkpw

Tmax supports the following security check mechanisms:

  1. No security

  2. Domain security check

  3. User security check

  4. Service access control

To use a security mechanism, a user name and password must be registered in a password file located in a $(TMAXDIR)/config directory. The mkpw command manages a password file.

  • Usage

    $ mkpw [-f file_name] [-a | -d | -i | -n | -p | -h | -V] 
           [-G group_name] [-u uid]
    OptionDescription
    [ -f filename ]The name of a password file. The default file is $(TMAXDIR)/config/passwd.
    [ -a ]Adds a user.
    [ -d ]Deletes a user.
    [ -i ]Changes user information.
    [ -n ]Creates a new password file.
    [ -p ]Changes the password of a user. If no option is specified, the default action will be $ mkpw -f $(TMAXDIR)/config/passwd -p.
    [ -h ]Shows command Help.
    [ -V ]Shows the version of an executable file.
    [ -G group_name ]

    The name of a group that has a corresponding user. To use a security function for a service access control, a group file and a user file must be created, and users must exist in a group. Use a mkpw command to create a user file and a password file. When making the password file, use a [-G] option to create the file using a method that is different from the previous version to call an ACL service.

    When specifying a group name with the [-G] option, use a [-u] option to ensure that a group from the group file is specified.

    [ -u uid ]Unique ID for a corresponding user. This option is used with a [-G] option and is specified only when a level 3 service access control is used.
  • Results

    The following are the type and contents of a password file and user file when [ -G] and [ -u] options are used.

    • Password File

      Type:

      username:passwd:user_id:group_id:Description:x:x

      Example of a Password File:

      starbj1:UnQGcdDkNqXNc:1:1:starbj1:x:x
      starbj2:mPLY7VZtNvRXs:2:2:starbj2:x:x
      starbj3:aiu6Mt36rqwe6:3:3:starbj3:x:x
      starbj4:vVdS9naV02jA.:4:4:starbj4:x:x
      starbj5:568kCzyzYXriQ:5:5:starbj5:x:x
      starbj6:ouKrHf/89QMW6:6:6:starbj6:x:x
      starbj7:Mx8PaESrqWR4I:7:7:starbj7:x:x
      starbj8:LL59popHJp59U:8:8:starbj8:x:x
      starbj9:RG/S5BetAPeFs:9:9:starbj9:x:x
      starbj10:Ebbzv1Ecx0abE:10:10:starbj10:x:x
    • User File

      Type:

      user file:username:user_id:group_id

      Example of a User File:

      starbj1:1:1
      starbj2:2:2
      starbj3:3:3
      starbj4:4:4
      starbj5:5:5
      starbj6:6:6
      starbj7:7:7
      starbj8:8:8
      starbj9:9:9
      starbj10:10:10

  • Environment

    This command can be used in a system with a Tmax system installed.

2.9. mksvr

The mksvr command creates a Tmax server module with a cc compiler. This command allows a service to be dynamically registered without being registered in a Tmax configuration file. All options must be specified within 1024 characters.

  • Usage

    $ mksvr {-s { @filename | service[,service...] [:func]}} [-o outfile] 
            [-f firstfiles] [-v] [-r rmname ] [-S sdlfilename] [-l lastfiles] 
            [-t servertype] [(-32)|-64] [-V] [-a autotran] [-T svctime]
            [-u UserCompileOption] 
    OptionDescription
    [ -s { @filename | service[,service...] [:func] } ]

    A service name in a service. One or more service names are recorded in a file specified by a 'filename', which is preceded by an '@' character. A single service name is written on each line of the file. No whitespace is allowed when specifying multiple service names separated by a semicolon (;). When specifying a 'func', a request for a service is handled in the 'func'.

    Options can be specified multiple times.

    (e.g., -s TOUPPER -s TOLOWER)

    Information about AUTOTRAN and SVCTIME can be specified with double quotation marks ("). The result of the following is the same as ' -s TOUPPER -a 1 -T 10'. This setting can also be used in a function list file.

    (e.g., -s "TOUPPER 1 10")

    [ -o outfile ]A server module name.
    [ -f firstfiles ]If a user definition file is specified, the file will be linked and compiled before a server library provided by Tmax is compiled. A user definition file usually specifies a server program.
    [ -v ]Displays the progress of a compilation in a verbose mode in a console.
    [ -r rmname ]

    A resource manager connected to a server module to be created.

    A 'rmname' is specified in a "rmname:stub:XA libraries" format in a $TMAXDIR/config/RM file. A stub is set to a DBMS stub (<liboras.so>, <libsybs.so>, <libinfs.so>, and <libdb2s.so>), which is provided by Tmax.

    If this option is specified, the stub and XA libraries will be linked and compiled by a cc compiler. If this option is not specified, <libnodb.so> will be linked by default.

    [ -S sdlfilename ]

    The object file of a sdl file (.s) for a server module that uses a SDL buffer.

    If this option is not specified, $TMAXDIR/lib/sdl.o will be linked by default.

    [ -l lastfiles ]If a user definition file is specified, the file will be linked and compiled after a server library provided by Tmax is compiled. A user definition file usually specifies a server program.
    [ -t servertype ]

    The value of a SVRTYPE in the SERVER section of a Tmax configuration file.

    • If this option is not specified, a server type will be regarded as a STD and <libsvr.so> will be linked during compilation.

    • If this option is specified, Tmax libraries will be linked during compilation.

    [(-32) | -64]

    Specifies whether a server module to be created is 32 bit or 64 bit.

    • [-32]: The Tmax library path is set to $TMAXDIR/lib. This is the default value.

    • [-64]: The Tmax library path is set to $TMAXDIR/lib64.

    [ -V ]Shows the version of an executable file.
    [ -a autotran ]

    Option to use an AUTOTRAN for a dynamically registered service.

    • 0: NO

    • 1: YES

    [ -T svctime ]

    A SVCTIME for a dynamically registered service.

    • 0: SVCTIME is set to infinity.

    • A number greater than 0: SVCTIME is set to that number.

    [ -u UserCompileOption ]

    Replaces default compilation options for a platform specified by a mksvr command with user-defined compilation options. Be aware that library and included related options are not applicable.

    To specify two or more options, specify as follows.

    (e.g., -u opt1 opt2)
  • Environment

    This command can be used in Windows NT and Windows 2000 where Tmax 3.8.16 or later is installed.

  • Notice

    There are constraints when dynamically registering a service in a server module with a COUSIN or BACKUP commands. Since COUSIN and BACKUP server groups manage services registered in multiple nodes, a service dynamically registered with a mksvr command cannot be released.

    A service can be moved and removed in a general server group if the service is re-registered with a mksvr after executing a tmdown for a corresponding server. COUSIN and BACKUP server groups do not allow a service to be released.

    Consider the following when dynamically registering a service with a mksvr command.

    • The server group type of a corresponding server

    • Whether a corresponding service has already been registered

2.10. racd

The racd command centralizes the management of nodes in a distributed multi-node environment. racd is a daemon process that starts in each node to allow a single node to manage a Tmax system built with multiple nodes in a domain. The node that manages a Tmax system is not required to execute a racd.

racd allows a node in a domain to manage all nodes with a tmadmin or a configuration file, which is applied to all nodes in a domain by a cfl.

If IPv6 is used, the following must be specified in a configuration file.

SYSTEM_IPV6=Y

To use a [-k] option, the following must be specified in an environment variable.

TMAX_RAC_IPV6=Y

  • Usage

    $ racd [-d] [-f binary Tmax configuration file name] [-h] [-k]
           [-i filename] [-l Label] [-P umask] [-V]
    OptionDescription
    [ -d ]Works in the debug mode.
    [ -f binary Tmax configuration file name ]A binary Tmax configuration file to be used. The binary configuration file is the result of executing a cfl command and is referenced by tmboot and tmdown. The path to the file can also be specified. If a path is not specified, <tmconfig> in the $TMAXDIR/config directory will be used.
    [ -h ]Shows command Help.
    [ -k ]

    Option to use a binary Tmax configuration file. If this option is specified, the configuration file will not be used. A racd is usually executed with this option (passive listen mode).

    If this option is used when IPv6 is used, 'TMAX_RAC_IPV6=Y' must be set because the configuration file will not be used.

    [ -i filename ]

    Used to define multiple logical nodes in a single physical machine.

    If the NODETYPE of a logical node is SHM_RACD, a racd must be executed for each logical node and each node must have a unique RACPORT. A TMAX_RAC_PORT environment variable must be set before executing a racd. When there are too many logical nodes, the name of the file that defines TMAXHOME, TMAXDIR, and TMAX_RAC_PORT can be specified, because it is difficult to set the variable for each node. For more information, see the examples in the following sections.

    [ -l Label ]A delimiter used for information registered in a configuration file. When information of two or more systems is registered in a single file, the delimiter separates the information of each system.
    [ -P umask ]Allows a user to create a file with desired permissions for a process started by a racd.
    [ -V ]Shows the version of an executable file.
  • Environment

    This command can be used in a system with a Tmax system installed.

  • Examples

    • The following sets a desired umask by specifying a -P option to a racd.

      <tmax.racd>

      [tmaxs1]
      TMAXHOME = /user2/starbj81/tmax32
      TMAXDIR = /user2/starbj81/tmax32
      TMAX_RAC_PORT = 3333
      [NODE1]
      TMAXHOME = /user2/starbj81/tmax32
      TMAXDIR = /user2/starbj81/proj1
      TMAX_RAC_PORT = 4335
      [NODE2]
      TMAXHOME = /user2/starbj81/tmax32
      TMAXDIR = /user2/starbj81/proj2
      TMAX_RAC_PORT = 4337
      1. Create a configuration file.

        *DOMAIN
        tmax1      SHMKEY = @SHMEMKY@, MINCLH = 1, MAXCLH = 3,
                   TPORTNO = @TPORTNO@, BLOCKTIME = 30, RACPORT = 3255
        
        *NODE
        @HOSTNAME@ TMAXDIR = "@TMAXDIR@",
                   APPDIR = "@TMAXDIR@/appbin",
                   PATHDIR = "@TMAXDIR@/path",
        
        @RMTNAME@  TMAXDIR = "@RMTDIR@",
                   APPDIR = "@RMTDIR@/appbin",
                   PATHDIR = "@RMTDIR@/path",
        
        *SVRGROUP
        svg1       NODENAME = "@HOSTNAME@", COUSIN = "svg2"
        svg2       NODENAME = "@RMTNAME@"
        
        *SERVER
        svr2       SVGNAME = svg1, CLOPT = "-o $(SVR).out -e $(SVR).err"
        
        *SERVICE
        TOUPPER    SVRNAME = svr2
      2. Start a racd in a remote node.

        $ export TMAX_RAC_PORT = 3255
        $ racd –k –P 055
      3. Start all Tmax instances in a HOST node (tmboot).

      4. Check the permission for the <svr2.out> file in the ULOGDIR of the RMT node.

    • The following executes a racd in NODE 1.

      $ racd -k -i tmax.racd -l NODE1
    • The following uses only information used by another command, such as tmboot, without referring to a configuration file.

      $ racd -k

Note

1. For more information about tmboot and tmdown, refer to "2.26. tmboot" and "2.28. tmdown" respectively.

2. For more information about logical node settings, refer to HOSTNAME in the "3.2.2. NODE Section" of the "Tmax Administrator's Guide".

2.11. racdr

The racdr command uses the racd process running in another domain to transfer a file to a directory or to execute the tmboot, tmdown, cfl, or gst. A node that manages a Tmax system is not required to execute a racd. racd in other domains must be executed using a version of racd that can handle racdr requests.

The following is an example of a configuration file that must be created to use racdr. The file contains IP addresses of other domains, RACPORT used by racd, and directories to transfer a file.

#nodename  #ip-address  #racport  #dest1          #dest2          #dest3
tmdom1no1  192.168.1.1  5000      /tmax/appbin    /tmax/applib    /tmax/etc
tmdom1no2  192.168.1.2  5000      /tmax/appbin    /tmax/applib    /tmax/etc
aphost1    192.168.10.1 9999      /apps/tp/appbin /apps/lib       /apps/tp/config
...

  • Usage

    $ racdr [-f cfg_file] [-n node_name] [-c command] [-s file_name] [-d dest_no] [-V] [-h]
    OptionDescription
    [ -f cfg_file ]

    Configuration file that contains node information of other domains.

    If this option is not specified, <racdr.cfg> in the current directory or $TMAXDIR/config/racdr.cfg is used.

    [ -n node_name ]Node name defined in the configuration file. All requests are sent to racd in the specified node and processed. This option is mandatory.
    [ -c command ]

    Command to be executed in racd. If the command has parameters, use double quotes (") to pass them as a single argument.

    Only tmboot, tmdown, cfl, and gst commands are available. Other commands and shell scripts cannot be executed.

    [ -s file_name ]

    Sends the file to the corresponding node. This option must be used with the -d option.

    If a file with the same name already exists in the save location, the existing file is renamed and the new file is saved. "_yymmddhhmmss", which is based on the current time, is appended to the file name after the existing file is renamed. If the changed file name also exists, "_<number>" is appended to the changed file name.

    If a file fails to be sent, the file is removed and the existing file is recovered.

    [ -d dest_no ]

    Path in which a file is saved. Up to 3 paths can be set.

    The path can be set in the configuration file. dest_no is the directory number. Specify 1 for the first path (dest1), 2 for the second path (dest2), and 3 for the third path (dest3).

    [ -V ]Shows the version of an executable file.
    [ -h ]Shows command Help.
  • Caution

    • A command specified with the -c option of racdr cannot be executed if an input is required to process the command. Specify command parameters to avoid entering input.

      E.g., a command that cannot be executed:
      $ tmdown
             Do you really want to down all instances of Tmax? (y : n):
      E.g., a command that can be executed:
      $ tmdown -n node1
    • The result of the command is not immediately displayed in a console. It is sent to racdr and displayed when the command ends after all tasks are complete.

      For example, even though it takes long time to boot Tmax with tmboot, racdr cannot immediately display the booting process.

    • When the command result is output to stdout or stderr, the output order can differ with the actual order. A stderr output of tmboot is not sent to racdr.

    • racd cannot handle an additional request while handling a racdr request.

    • If the last parameter of a command can end with a numeric value but none are specified, a [-r] option is internally attached by a racd, which is treated as the number '0'. The command is handled without an error.

      For example, if a -c "tmboot -d" is executed, a command is read as "tmboot -d 0" and an error will not occur.

      When the last option is an option that must be used along with a number parameter such as a [-d], ensure that the parameter is specified appropriately. If the parameter is omitted, 0 will be automatically attached and an error will not occur. For example, a -c "tmboot -d" is regarded as –c "tmboot –d 0" and an error will not occur.

  • Examples

    • The following sends the /app/svr2 file to the /tmax/appbin directory in the tmdom1no1 node. (Assume that the configuration file is the same as in the previous example.)

      $ racdr -f racinfo.txt -n tmdom1no1 -s /app/svr2 -d 1
    • The following executes the cfl command in the tmdom1no1 node. The tmaxconfig.m file must be copied to the $TMAXDIR/config directory of the corresponding node before executing this command.

      $ racdr -f racinfo.txt -n tmdom1no1 -c "cfl -i tmaxconfig.m"
    • The following executes the tmboot command in the tmdom1no1 node.

      $ racdr -f racinfo.txt -n tmdom1no1 -c "tmboot -n tmdom1no1"
    • The following terminates a specific server from the tmdom1no1 node.

      $ racdr -f racinfo.txt -n tmdom1no1 -c "tmdown -n tmdom1no1 -S svr2"

Note

For more information about the racd command, refer to "2.10. racd".

2.12. sdlc

There are several methods of communication between a server and a client. One method uses a structure. To use a structure for data communication, the structure must be recognized by a Tmax system. The sdlc command compiles a file that defines structures.

SDL (Structure Data Language) is a standard structure data type defined by Tmax. Data types, such as Integers, Floats, and Doubles, have the following problems when used to communicate between heterogeneous nodes.

  • Type length

  • Machine type - Big / Little Endian

  • Alignment

To address these problems, SDL, which supports Integer, Float, and Double, was developed.

Structures used in both a client program and a server program must match. If a structure is changed, the structure must be recompiled for both the client and the server with a sdlc command. A newly created <structure file name_sdl.c> file must be recompiled with a server program. The structure file to be used will have a .s extension and the result will have a <structure file name_sdl.c> format. A buffer type structure used for communication between a server and a client is defined in a structure file, and the name of the structure is used in tpalloc(), tpcall(), and tpacall(), as well as other functions with a communication buffer.

A file created with a sdlc command must be registered in the SDLFILE environment variable in a client.

  • Usage

    $ sdlc [-c] [-h header file name] {-i structure file name} [-o result name] 
           [-s] [-v VIEW definition file] [-32] [-4vb|-4dp] [-f] [-V]
    OptionDescription
    [ -c ]

    Used for a client program. This option compiles a structure file used by a client program and converts it into a binary structure definition file with a standard data type.

    <structure file name.sdl> is used to send and receive standard communication data when a client program is executed.

    If this option is used, multiple structure files can be compiled together (e.g., sdlc -c -i *.s or sdlc -c -i demo.s sam.s abc.s). The default name of a sdl file created is <demo.sdl>. To rename the file, use a [-o] option.

    If this option is not used, a sdlc command will create a program that encodes (converts a node data type into a standard data type) and decodes (converts a standard data type into a node data type) by compiling a structure file. Compiling the program with a server program creates a <structure file name_sdl.c> file, which has standard SDL type data.

    [ -h header file name ]Changes the name of a sdl header file from a default name, which is <structure file name_sdl.h>.
    { -i structure file name }

    A file that defines the structures used in server and client programs. This option is mandatory. The length of a structure name can be up to 16 characters.

    [ -o result name ]Changes the name of a resulting sdl file from the default name, which is <structure file name.sdl>.
    [ -s ]

    Used for a server program, this option creates a binary structure definition file. The file created is the same as a file created with a [-c] option.

    Compiling a structure file creates a program that encodes and decodes each field of a structure according to a SDL type. A created file name is <structure file name_sdl.c>. This file is required to be compiled with a server program.

    [ -v VIEW definition file]

    This option must be used to create a binary structure definition file for a conversation between a structure buffer and a field key buffer, . A service can be requested by saving structure buffer data in a field key buffer or by saving field key buffer data in a structure buffer.

    The fbftos() and fbstof() functions can be used. For more information, see the examples in the following sections.

    [ -32 ]Compiles a structure file into a 32 bit file to use 32 bit libraries in a 64 bit environment.
    [ -4vb ]Creates a Visual Basic interface file.
    [ -4dp ]Creates a Delphi interface file.
    [ -f ]A Visual Basic file name or a Delphi interface file name. This option must be used with [-4vb] or [-4dp] options.
    [ -V ]Shows the version of an executable file.
  • Environment

    This command is supported in UNIX and MS-DOS.

  • Examples

    • The following is the structure of a VIEW definition file:

      <demo.v>

      VIEW demo
      #type   Cname   fldkey count  flag size null
      String  Demodata       INPUT  5    -    20     “”
      Int     Num     INTDATA       5    -    -       0
      END
      ItemDescription
      typeThe data type of member variables in a structure.
      CnameThe name of a member variable.
      fldkeyA field key mapped to a specified member variable.
      countThe maximum sequential number of a field that can be saved in a structure.
      flagCurrently not used.
      sizeA string type array size.
      nullAn initial value.

      The following command creates a binary structure definition file:

      $ sdlc -c -v demo.s -o tmax.sdl

    • The following compiles a <demo.s> structure file in a current directory for a server. <demo.sdl> and <demo_sdl.c> files are created, and <demo_sdl.c> is used to create a server program.

      $ sdlc -i demo.s
    • The following compiles a <demo.s> structure file in a current directory for a client. A <demo.sdl> binary data file is created.

      $ sdlc -c -i demo.s

2.13. svcrpt

The svcrpt command analyzes and prints log records related to a service execution while a Tmax system operates. The name of a server and service, time of execution, and average service run time are displayed hourly during a specified period. Service logs are saved in $ULOGDIR in a <svclog.mmddyyyy> file every five minutes if a [-I] option is set in the CLOPT section of each server.

  • Usage

    $ svcrpt [-T | -N] [-s svcname] [-v svrname] [-x] [-S] [-d mm:dd] [-c column] 
             [-f hh:mm:ss] [-t hh:mm:ss] [-V] -i logfile
    OptionDescription
    [ -T | (-N) ]
    • [-T]: Sorts results by the order of total service run time.

    • [-N]: Sorts results by service execution count. This is the default value.

    [ -s svcname ]A service to be displayed.
    [ -v svrname ]A server to be displayed.
    [ -x ]Shows detailed information such as a server program name and maximum/minimum run times.
    [ -S ]Shows a service summary.
    [ -d mm:dd ]The date of service logs to be analyzed.
    [ -c column ]Changes the default number of columns to be displayed. Default value: 5.
    [ -f hh:mm:ss ]An analysis start time.
    [ -t hh:mm:ss ]An analysis end time.
    [ -V ]Shows the version of an executable file.
    -i logfileA log file to be analyzed.
  • Environment

    This command can be used in a system with a Tmax system installed.

  • Examples

    • The following analyzes a <svclog.04152002> log file and displays the result hourly.

      $ svcrpt -i svclog.04152002
    • The following analyzes a <svclog.04012002> log file and displays the execution count and average run time of a service named 'account' hourly, which was executed on April 15th.

      $ svcrpt -s account -d 04:15 -f 09:00:00 -t 12:00:00 -i svclog.04012002

2.14. tdlclean

The tdlclean command removes outdated library files and unnecessary files in a run directory. To remove a dynamic module from shared memory, use [-m] or [-M] options.

  • Usage

    $ tdlclean [-p TDL root directory path] [-m library name] [-M function name] [-b] 
               [-d yyyymmddhhmi] [-D "n hour|day"] [-N number] [-v | -V] [-h]
    OptionDescription
    [ -p TDL root directory path ]A TDL root directory. Default value: $TDLDIR or $TMAXDIR.
    [ -m library name ]Removes a specified library from a TDL shared memory and relevant files from a run directory.
    [ -M function name ]Removes a specified function from shared memory. Relevant files in a run directory are not removed. If VERSION is set to 1, the result of this option will be the same as a [-m] option.
    [ -b ]

    A shared memory file is not backed up even if a BACKUP parameter is specified in a TDL configuration file <tdl.cfg>.

    Cannot be used with [-m] or [-M] options.

    [ -d yyyymmddhhmi ]

    Removes all outdated library files created before a specified date and time (yyyymmddhhmi).

    Cannot be used with [-m] or [-M] options.

    [ -D "n hour|day" ]

    Removes all outdated library files created before a specified hour or day.

    Cannot be used with [-m] or [-M] options.

    [ -N number ]

    Removes outdated library files except for a specified number of outdated libraries.

    Cannot be used with [-m] or [-M] options.

    [ -v | -V ]Shows version information.
    [ -h ]Shows command Help.
  • Examples

    • The following removes outdated library files:

      $ tdlclean
    • The following removes library files that were created before 00:00 on February 1st, 2009:

      $ tdlclean –d 200902010000
    • The following removes library files older than five days:

      $ tdlclean -D "5 day"
    • The following removes mylibrary from a TDL shared memory and outdated files:

      $ tdlclean -m mylibrary

2.15. tdlinit

The tdlinit command initializes a TDL shared memory and dynamic modules. This command is executed only once when Tmax is installed and before Tmax starts. This command can be executed only in a master node in a multi-node environment.

  • Usage

    $ tdlinit [-p TDL root directory path] [-x export function extraction script file path] 
              [-f] [-b] [-B backup file path] [-i] [-v | -V] [-h]
    OptionDescription
    [ -p TDL root directory path ]A TDL root directory. Default value: $TDLDIR or $TMAXDIR.
    [ -x export function extraction script file path ]The path of a script file that extracts an export function.
    [ -f ]Initializes already existing shared memory by force.
    [ -b ]Restores shared memory from a backup file.
    [ -B backup file path ]Restores shared memory from a specified backup file.
    [ -i ]Checks a run directory after a backup. Used with [-b] or [-B] options.
    [ -v | -V ]Shows version information.
    [ -h ]Shows command Help.
  • Examples

    • The following initializes shared memory and modules using a TDL configuration file <tdl.cfg>:

      $ tdlinit
    • The following backs up shared memory from a backup file in the event of a system failure or restart:

      $ tdlinit -b

  • Note

    A script file that extracts an export function is required when a VERSION is set to 4.

    /* Example of exp file */
    /* dlib.exp */
    
    #! dlib.so
    TmaxSoft::Airplain
    Car

2.16. tdlnm

The tdlnm command retrieves a list of functions that are automatically exported to a specified library when a VERSION is set to 2 or higher.

  • Usage

    $ tdlnm [-p TDL root directory path] [-x export function extraction script file path]
            [-m library name] [-v | -V] [-h]
    OptionDescription
    [ -p TDL root directory path]A TDL root directory. Default value: $TDLDIR or $TMAXDIR.
    [ -x export function extraction script file path ]The path of script file that extracts an export function.
    [ -m library name ]A library that retrieves a list of automatic export functions.
    [ -v | -V ]Shows version information.
    [ -h ]Shows command Help.
  • Example

    The following retrieves a list of export functions of a mylibrary file:

    $ tdlnm -m mylibrary

2.17. tdlrm

The tdlrm command removes shared memory when a TDL is no longer used. tdlcall() cannot be called after this command is executed.

  • Usage

    $ tdlrm [-p TDL root directory path] [-v | -V] [-h]
    OptionDescription
    [ -p TDL root directory path ]A TDL root directory. Default value: $TDLDIR or $TMAXDIR.
    [ -v | -V ]Shows version information.
    [ -h ]Shows command Help.
  • Example

    The following removes a TDL shared memory:

    $ tdlrm

2.18. tdlshm

The tdlshm command retrieves information about a TDL shared memory and enables/disables statistics monitoring and modules.

  • Usage

    $ tdlshm [-p TDL root directory path] [-r] [-S] [-n node name] [-m function name] 
             [-M library name] [-C] [-c start_index end_index] [-s e|d|r] 
             [-u e|d] [-I mincol] [-v | -V] [-h]
    OptionDescription
    [ -p TDL root directory path ]A TDL root directory. Default value: $TDLDIR or $TMAXDIR.
    [ -r ]Retrieves information about modules that are currently synchronizing updates in a multi-node environment.
    [ -S ]Retrieves information about dynamic module statistics. Statistics include runtime AVG/MIN/MAX and CPU AVG/MIN/MAX for each module.
    [ -n node name ]A node to be retrieved in the multi-node environment.
    [ -m function name ]A function to be retrieved.
    [ -M library name ]A library to be retrieved.
    [ -C ]Executes a dlopen and dlsym for all modules.
    [ -c start_index end_index ]Executes a dlopen and dlsym for modules within a specified index range.
    [ -s e|d|r ]

    Dynamic module statistics monitoring.

    • e: Enable

    • d: Disable

    • r: Initialize

    [ -u e|d ]

    A Dynamic module.

    • e: Enable

    • d: Disable

    This option must be used with [-m] or [-M] options because only a single module can be set at one time.

    • A [-m] option must be specified when a VERSION is set to 1 or 2 because a module name must be unique for all libraries. A function name used as an argument of the [-m] option must be unique.

    • [-m] and [-M] options must be specified when a VERSION is set to 3 because function names can be the same if their libraries differ. The [-M] option must be used with the [-m] option.

    [ -I minimum collision count ]

    Displays a comparison count when buckets are searched due to hash collisions for each module. Information about modules with a collision count greater than or equal to a value is displayed. This option can be used with [-p], [-m], [-M], and [-r] options. The value must be 0 or greater.

    [ -I mincol ]

    Displays a comparison count, in a "Collision=n" format, when a hash collision occurs in a module. If n is 0, only one comparison was found.

    mincol is a minimum comparison count. The value must be greater than 0. When displaying each module, only information about modules with a comparison count greater than a specified value are displayed. Set mincol to a large value to quickly find a function with a high comparison count.

    This option can be used with [-p], [-m], [-M], and [-r] options.

    [ -v | -V ]Shows version information.
    [ -h ]Shows command Help.
  • Examples

    • The following is the basic usage of tdlshm:

      $ tdlshm TDLDIR = /home/jeffry/tmax LOGDIR = /home/jeffry/tmax/log/dlog 
      - BACKUP = /home/jeffry/tmax/log/dlog/tdl.bak VERSION = 2, SHMKEY = 0x90000, 
      - IPCPERM = 0750 MAXMODULES = 256, CURMODULES = 3, Global SEQNO = 45e27d28, 
      - MONITOR = Y MODE = SINGLE, DOMAINID = 1 Index = 125, Funcname = myfunction1, 
      - Libname = myfunction1, Seqno = 45e27d28, Active = Y Index = 126, 
      - Funcname = myfunction2, Libname = myfunction2, Seqno = 45e27d28, Active = Y, 
      - Index = 127, Funcname = myfunction3, Libname = myfunction3, Seqno = 45e27d28, 
       Active = Y 
    • The following retrieves information about TDL statistics:

      $ tdlshm -S TDLDIR = /home/jeffry/tmax LOGDIR = /home/jeffry/tmax/log/dlog 
      - BACKUP = /home/jeffry/tmax/log/dlog/tdl.bak VERSION = 2, SHMKEY = 0x90000, 
      - IPCPERM = 0750 MAXMODULES = 256, CURMODULES = 3, Global SEQNO = 45e27d28, 
      - MONITOR = Y MODE = SINGLE, DOMAINID = 1 Index = 125, Funcname = myfunction1, 
      - Libname = myfunction1, Seqno = 45e27d28, Active = Y Count = 0 SVC: Avg = 0.000, 
      - MinTime = 0.000, Maxtime = 0.000 CPU: Avg = 0.000, MinTime = 0.000, 
      - Maxtime = 0.000 Index = 126, Funcname = myfunction2, Libname = myfunction2, 
      - Seqno = 45e27d28, Active = Y Count = 0 SVC: Avg = 0.000, MinTime = 0.000, 
      - Maxtime = 0.000 CPU: Avg = 0.000, MinTime = 0.000, Maxtime = 0.000 Index = 127, 
      - Funcname = myfunction3, Libname = myfunction3, Seqno = 45e27d28, Active = Y 
      - Count = 0 SVC: Avg = 0.000, MinTime = 0.000, Maxtime = 0.000 CPU: Avg = 0.000, 
      - MinTime = 0.000, Maxtime = 0.000 
    • The following is the result when [-s] or [-u] options are used:

      $ tdlshm -s r
      $ tdlshm -s e -m myfunction
      $ tdlshm -s d -m myfunction
      $ tdlshm -u e -m myfunction
      $ tdlshm -u d -m myfunction
    • The following is the result when [-C] or [-c] options are used:

      $ tdlshm -C
      $ tdlshm -c 0 1024
      $ tdlshm -c 1024

2.19. tdlsync

The tdlsync command synchronizes a backup file with a TDL shared memory. This command is necessary when automatic backup is disabled.

  • Usage

    $ tdlsync [-p TDL root directory path] [-B backup file path] [-v | -V] [-h]
    OptionDescription
    [ -p TDL root directory path ]A TDL root directory. Default value: $TDLDIR or $TMAXDIR.
    [ -B backup file path ]A backup file path.
    [ -v | -V ]Shows version information.
    [ -h ]Shows command Help.
  • Example

    The following example backs up shared memory with a file specified as a BACKUP in a TDL configuration file <tdl.cfg>:

    $ tdlsync

2.20. tdlupdate

The tdlupdate command updates a specified dynamic module. A library name must be specified with a [-m] option. If a specified library is already registered, the library will be updated. If the library is not registered, it will be added. This command can be executed only in a master node in a multi-node environment.

  • Usage

    $ tdlupdate [-p TDL root directory path] [-x export export function extraction script file path] [-f] 
                [-m library name] [-b] [-c] [-l file name] [-v | -V] [-h]
    OptionDescription
    [ -p TDL root directory path ]A TDL root directory. Default value: $TDLDIR or $TMAXDIR.
    [ -x export function extraction script file path ]The path of a script file that extracts an export function.
    [ -f ]Updates a function by force even if a function with the same name exists in another library when a VERSION is set to 2.
    [ -m library name ]A library to be updated.
    [ -b ]Does not backup a shared memory file even if a BACKUP is specified in a TDL configuration file.
    [ -c ]Executes version synchronization between nodes in a multi-node environment.
    [ -l file name ]Creates a file that contains a list of modules to be updated, and then updates the modules. The module delimiter is a comma (,) or a newline.
    [ -v | -V ]Shows version information.
    [ -h ]Shows command Help.
  • Examples

    • The following updates a <mylibrary.so> file:

      $ tdlupdate -m mylibrary
    • The following updates multiple modules. The delimiter is a comma (,), and spaces are not allowed. There is no limit to the number of modules, but the maximum number is 1024 in a multi-node environment.

      $ tdlupdate -m mylibrary,mylibrary2,mylibrary3
    • The following creates a file that contains a list of modules to be updated, and then updates the modules. There is no limit to the number of modules in the file, but the maximum number is 1024 in a multi-node environment.

      $ tdlupdate -l update.list
    • The following is an <update.list> file. A comma (,) and newline can be used as a delimiter:

      mylibrary,mylibrary2
      mylibrary3
    • The following synchronizes nodes when there is an inconsistency in shared memory in a multi-node environment:

      $ tdlupdate -c

  • Note

    A script file that extracts an export function is required when a VERSION is set to 4:

    /* Example of exp file */
    /* dlib.exp */
    
    #! dlib.so
    TmaxSoft::Airplain
    Car

2.21. tencrypt

The tencrypt command encrypts the OPENINFO section in a configuration file. The OPENINFO section is not encrypted whenever a cfl is executed. However, data specified by a [-e] option is encrypted with an encryption tool and encrypted data is added to the OPENINFO section of a configuration file.

  • Usage

    $ tencrypt [-e information in the OPENINFO section]
    OptionDescription
    [ -e information in the OPENINFO section ]Encrypts specified information in an OPENINFO section.
  • Example

    $ tencrypt [-e ORACLE_XA+Acc=P/scott/tiger+SesTm=6]
    Please insert the following text in the configuration file "OPENIFNO" field.
    [@@QEAzMWU4Y0lOYXd2Y2lkSzdpTW1lL0F4U0d1NCswekkxSFlaMjJweldOTERaM2ptVT0jQEBvNV
    JPVUE9PQ==@@]
    
    > Add the following in a configuration file.
    Enter the result inside [ and ] in a desired OPENINFO section.
    OPENINFO="@@QEAzMWU4Y0lOYXd2Y2lkSzdpTW1lL0F4U0d1NCswekkxSFlaMjJweldOTERaM2ptVT
    0jQEBvNVJPVUE9PQ==@@"
    
    > Execute cfl and start tmax.

2.22. tmadmin

The tmadmin command starts tmadmin, a monitoring program provided as a command interpreter to dynamically manage a Tmax system. It displays information such as the configuration for a running system, the running status of a server process, and a service status, by reading information in the shared memory used by a Tmax system.

  • Usage

    $ tmadmin [-l] [-s|m] [-h] [-f [Config File]] [-n [Node Name]]
              [-v] [-V] [-p] [-t]
    OptionDescription
    [ -l ]Manages only local nodes when a system that consists of multiple nodes with a racd is managed by a single node. Each node can manage only its own system with this option.
    [ -s ]An option to allow up to 10 tmadmin tools to be executed in a read-only mode. This option prevents dynamic changes to an environment and is the default value.
    [ -m ]Converts to a master mode, which allows an environment to be dynamically changed. It is recommended that only one user uses a master mode because a critical system failure can occur if multiple users change an environment. A configuration file does not change.
    [ -h ]Shows command Help.
    [ -f [ Config File ] ]Manages a specified binary file. If an environment file is not tmconfig, a file name must be specified when tmadmin starts.
    [-n [ Node Name ] ]An option to monitor a specified node. This option facilitates easier system management when running tmadmin in a multi-node environment.
    [ -v ]Shows a Tmax version even if Tmax has not started.
    [ -V ]Shows the version of an executable file.
    [ -p ]Displays the result of st –p, st –s, si, ci, and cfg commands.
    [ -t ]Displays the start and the end time of a command execution. For more information, see the information in the following section.

    Executing a tmadmin with a [-t] option displays time in the following format:

    [TIME][Type   ] : hh:MM:ss:millisec
    TypeDescription
    STARTDisplays the start time of a command.
    ENDDisplays the end time of a command in a console. It is the time until a command is executed in a remote node.
    R_ENDDisplays the end time when a command is executed in a console and completed in a remote node. It is the time in a local node where a tmadmin is executed, not in a remote node.
    RP_STARTDisplays the time before starting a command when a tmadmin repeat command is used.
    RP_ENDDisplays the time spent executing a command when a tmadmin repeat command is used. It is the time after a command is executed in a remote node.
  • Environment

    This command can be used in a system with a Tmax system installed.

  • Example

    The following executes a tmadmin and shows that the tmadmin is running:

    $ tmadmin

    Executing a tmadmin displays the following message and prompt:

    --- Welcome to Tmax Admin (Type “quit” to leave) --- $$1 (tmadm):

Note

For more information about cfl, tmboot, and tmdown, refer to "2.1. cfl", "2.26. tmboot", "2.28. tmdown".

Commands Available in tmadmin

The following commands can be used after a tmadmin has been executed:

  • Monitoring Environment Information

    CommandDescription
    tmaxinfo(ti)Displays Tmax system information.
    history(hist)Displays previously saved commands.
    config(cfg)Displays an environment configuration.
  • Monitoring Running Status

    CommandDescription
    stat(st)Displays statistics about a process and service statuses. A wild card can be used.
    gwinfoDisplays the status of gateway channels set in a GATEWAY section.
    txgwinfo(txgwi)Displays Tmax gateway information.
    nontxgwinfoDisplays Tmax non-transaction gateway information.
    jgwinfoDisplays JEUS gateway information.
    ajgwinfoDisplays JEUS asynchronous gateway information.
    wsgwinfoDisplays web service gateway information.
    smtrcUses a GID to display the status of a running service.
    clhsinfoDisplays connection status information between CLHs in a multi-node environment.
    tmmsinfoDisplays connection status information between TMMs in a multi-node environment.
    repeat(r)Re-executes a command.
    clientinfo(ci)Displays a connected client.
    svrinfo(si)Displays server information. A wild card can be used.
    txquery(txq)Displays transaction handling information.
    rqstat(rqs)Displays a RQ status or process services residing in a disk queue.
  • Managing Operation

    CommandDescription
    suspend(sp)Suspends a server process.
    resume(rs)Resumes a suspended server process.
    advertise / unadvertiseAdvertises or unadvertises a specific service name.
    restatInitializes statistics about a specific server process or all server processes.
    rebootsvr(rbs)Replaces a server program.
    cfgadd(ca)Dynamically adds a service.
    setDynamically changes an environment configuration value.
    qpurge(qp)Deletes a job residing in a queue.
    discon(ds)Forcibly disconnects a client.
    logstart / logendStarts or Ends logging.
    chtrcManages traces.
    chlogDynamically changes the log level of a running TMM, a CLH, and a specific server.
    txcommit / txrollbackEnds a transaction by reissuing a commit or rollback when an error occurs while handling a transaction.
    wsgwreloadApplies changes to service information and a configuration for a web service gateway.
    restartRestarts a server process.
  • Others

    CommandDescription
    !Reexecutes the last command.
    quit(q)Terminates a tmadmin.
    help(h)Displays available options.
    nodeset(ns)Retrieves information about a specific node in a multi-node environment.
    nodeunset(nus)Cancels a setting to retrieve information about a specific node in a multi-node environment.
    tmdChecks the validity of a service program as a virtual client emulator instead of creating a client program.

Note

For more information about the usage and results of each command, refer to "5.2. tmadmin" in the"Tmax Administrator's Guide."

2.23. tmapm

A Tmax system configures service timeout setting by using a signal alarm. A tmapm is a separate server used to set and use service timeout setting when a signal alarm is not available.

A tmapm and a USC server are configured in the SERVER section of a configuration file as follows:

  • Usage

    *SERVER
    tmapm    CLOPT = [-i sec ]
                     [-r sec ]
                     [-c command ]
                     [-l [ 0 | 1 | 2 ]]
    OptionDescription
    [-i sec ]The interval (in seconds) for checking service time. Shorter intervals increase system load. A decimal number is allowed.
    [-r sec ]A command execution timeout (in seconds) after a service time is exceeded. Only an integer is allowed.
    [-c command ]A command that will be executed when a corresponding service is still in a RUNNING state after an execution time (SCVTIME + command execution timeout) has expired. Use a shell command or a script file.
    [-l [ 0 | 1 | 2 ]]A user log level. The default value is 0. A larger value outputs more detailed information.

    The following parameters are passed on when a specified command is configured with a -c option.

    User CommandPIDSVRNAMESVCNAME[Elapse Time]
    kill.sh9659svr2TOUPPER[5]
  • Example

    *SERVER
    tmapm    SVGNAME = svg, 
             SVRTYPE = UCS, 
             CLOPT = "-o ulog  --  -i 5 -r 1 -c kill.sh -l 1"

2.24. tmaxlibver

The tmaxlibver command retrieves a Tmax library version. When a library for UNIX is used, a Tmax version can be checked with the library. This command became available in Tmax 5.0 SP1.

  • Usage

    $ tmaxlibver {-l filename} {-d | -s} [-6] [-L directory] [-o arg] [-h]
    OptionDescription
    { -l filename }A library to be retrieved.
    { -d | -s }An option to make a library dynamic (-d) or static (-s).
    [ -6 ]An option to use a 64 bit library instead of the default 32 bit library. When a [-6] option is set and a [-L] option is not set, the library located in a $TMAXDIR/lib64 library will automatically be used.
    [ -L directory ]A path to a library. The path can be absolute or relative. If this option is not used, the default path will differ according to the use of a [-6] option.
    [ -o arg ]The path of a temporary file created when a tmaxlibver command is executed. If this option is not used, "/tmp/tmaxlibver_stub" will be created when the command is executed and removed when the execution completes.
    [ -h ]Shows command Help.
  • Example

    $ tmaxlibver -l libsvr.a –s -6
    libsvr.a for TMAX Version 5.0 SP #1 64bit binary for AIX 5L

Caution

In Tmax 5.0 SP1 and later, only the version of libcli, libclithr, libsvr, and libsvrucs libraries can be checked.

2.25. tmaxtrace

The tmaxtrace command allows a Tmax application administrator or developer to use runtime tracing for each application. Running tracing records the execution of an application. For example, the trace point is the start or end of an atmi function, such as a tpcall(), or the start of a transaction.

The following occurs when a trace point is created:

  1. A filter is applied to check the validity of a trace point. If the trace point is valid, a trace record is written in a receiver file and the final action is executed. The action can be a process abort, a system call, etc. A final action is optional.

  2. Filter, Receiver, and Trigger are defined according to the specification described in the following section. They can be defined when declaring a TMAX_TRACE environment variable in both a client and server.

    To change the specification of a running process, use a chtrc command of tmadmin.

  3. When a Trigger option in a TMAX_TRACE is set to 'dye', runtime tracing is executed in server processes that receive a corresponding service's request. If the option is set to 'dye' in a client, the process that handles the corresponding service becomes an atmi category and runtime tracing is executed.

  4. When TMAX_TRACE is used in a client, a ULOGPFX must be specified in a client configuration file, <tmax.env>, or an environment variable. If the following is specified, a <clilog.date> file is created in the corresponding directory and logs are written in the file.

    E.g., ULOGPFX=/data1/tmax50/client/clilog

The following describes the usage of TMAX_TRACE environment variables:

  • Usage

    TMAX_TRACE=filter-spec:receiver-spec[:trigger-spec]
    • filter-spec : category

      A category for which runtime tracing is executed can be specified. To specify all categories, use an asterisk (*). If filter-spec is not specified, no category is selected.

      CategoryDescription
      atmiRuntime tracing is executed when an ATMI is called by a user or a TX interface (a function with a name that starts with tp or tx) is called.
      iatmiRuntime tracing is executed when an ATMI is called by a user or a TX interface or an interface internally called by an interface is called.
      xaRuntime tracing is executed when any XA interface is called.
      traceDisplays Tmax trace configuration information.

    • receiver-spec : [/regular-expression/]receiver

      A trace record is sent to a 'receiver'. Currently, only a ulog receiver is used. When a ulog is set, runtime tracing will be executed with user logs. Using regular expressions allows tp limit trace points to be applied to a filter-spec. If a receiver-spec is not specified, no trace record will be written.

      ItemDescription
      trace record

      A receiver that is set to 'process-name.pid.hhmmss: TMAXTRACE:cc data' format. cc differs according to the category: for atmi, at; for iatim, dt; for xa, xa; and for trace, tr.

    • trigger-spec : [/regular-expression/]action

      A trigger specifies an action executed after sending a trace record to a receiver. This is optional.

      The following are the available actions:

      ActionDescription
      abortCalls an abort() to terminate a process.
      ulog(message)Writes a message in a user log.
      system(command)Executes a command using a system(). Windows does not support this action.
      trace(trace-spec)Changes the specification of a Tmax trace with a trace-spec.
      dyeDyes a message.
      undyeDoes not dye a message.
      sleep(seconds)Sleeps for a specified period (in seconds). Windows does not support this action.
  • Examples

    • The following example executes runtime tracing whenever an atmi interface is called:

      export TMAX_TRACE=atmi:ulog
    • The following example executes runtime tracing when a tpcall() is called:

      export TMAX_TRACE=atmi:/tpcall/ulog
    • The following example terminates a corresponding server process using an abort() when an atmi/tx interface is called:

      export TMAX_TRACE=atmi:ulog:abort
    • The following example executes runtime tracing whenever an atmi/tx interface is called but terminates a corresponding process by using an abort() when a tpend() is called:

      export TMAX_TRACE=atmi:ulog:/tpend/abort
    • The following example executes runtime tracing for all categories:

      export TMAX_TRACE=*:ulog:dye
    • The following example calls an atmi/tx interface and then changes a trace specification to "*:ulog:dye":

      export TMAX_TRACE=atmi:ulog:trace(*:ulog:dye)
    • The following example calls a tpalloc() and then changes a trace specification to "*:ulog:dye":

      export TMAX_TRACE=atmi:ulog:/tpalloc/trace(*:ulog:dye)
    • The following example is equivalent to 'TMAX_TRACE=atmi:ulog:dye':

      export TMAX_TRACE=on
    • The following does not use a tmaxtrace. This is the default setting.

      export TMAX_TRACE=off

2.26. tmboot

The tmboot command starts a Tmax system (or a portion of it) using a Tmax configuration file. When this command is executed without an option or only with a [-f] option, all Tmax management processes and all server processes registered in the SERVER section of a Tmax configuration file are executed.

Tmax management processes are executed in all nodes registered in a NODE section. The execution order is TMM, CLL, and finally CLH. If an OPENINFO is registered in the SVRGROUP section in a server group, TMS processes are executed by referring to TMSNANE and MINTMS for each server group. Tmax management processes are executed in the bin directory under a TMAXDIR directory defined by each node.

After Tmax management processes are created, all application server processes in a SERVER section are executed. The application server processes are executed in the order they were registered in a section. The tmboot command initializes the server processes with tpsvrinit() and then executes them after they are initialized. The number of application server processes executed by a tmboot command is defined by a MIN value. If MIN is not specified, the default value will be 1.

The tmboot command uses CLOPT, MIN, and MAX values for servers in a SERVER section. These values are the boot parameters used by a tmboot when starting a server process. Other items are runtime parameters used by a system after a server starts. For more information about how to set parameters, refer to the SERVER section in a source configuration file.

All application server processes are executed from a APPDIR directory defined for a running node:

  • Usage

    $tmboot [-A] [-b] [-c] 
            [-f binary Tmax configuration file name] 
            [-g servergroup_name [-a] [-i]]
            [-h] [-V] [-n node_name] 
            [ -o clopt_string ]
            [-q RQ svg_name]
            [-s server_name [-k count] [-a]] 
            [-S server_name [-a]] 
            [-t TMS_name[-k all]]
            [-B TRB_node] [-T] [-w] 
            [-d boot_time] [-D] 
            [-e clh | cas | tlm ] 
            [-k] [-R] 
    OptionDescription
    [ -A ]Executes all application server processes defined in the SERVER section of a Tmax configuration file.
    [ -b ]Used to arbitrarily start a server process specified as a backup.
    [ -c ]Executes an additional CLH process. The number of CLH processes cannot exceed a MAXCLH value, which is defined in a Tmax configuration file.
    [ -f binary Tmax configuration file name ]A binary Tmax configuration file (the result of compiling a source file with a cfl), which is specified with a path. If a [-f] option is not specified, <tmconfig> in a config directory under a TMAXDIR is used by default.

    [-g servergroup_name [-a]

    [-i]]

    Executes a server process in a specified server group. The server group name is registered in the SVRGROUP section of a Tmax configuration file.

    If a [-a] option is also used, a TMM process, not a TMBOOT process, will start a server.

    If an [-i] option is not used, a server booting process will be stopped if a server reaches the maximum number of times it can be restarted. However, if an [-i] option is used, even if a server reaches the maximum number of times it can be restarted., a following server will be started and the entire process will proceed. If all servers reach the maximum number of times it can be restarted., the following message will be displayed.

    (I) BOOT3022 all servers in group (svgname) reached max [BOOT0039]
    [ -h ]Shows command Help.
    [ -V ]Shows the version of an executable file.
    [ -n node_name ]Executes a server process in a specified node. The node name must be previously registered in the NODE section of a Tmax configuration file.
    [ -o clopt_string ]Adds a CLOPT string.
    [ -q RQ svg_name ]Starts a RQS.
    [ -s server_name [-k count] [-a] ]

    Executes a specified server processes. The server processes must be previously registered in the SERVER section of a Tmax configuration file.

    To specify the number of server processes, use a [-k] option. The number of server processes, which includes currently running server processes, cannot exceed the value of MAX in the SERVER section.

    If a [-k] option is omitted, only a specified server process will be executed. If an -a option is used, a TMM process, not a TMBOOT process, will start a server.

    [ -S server_name ]Executes a MIN number of server processes. If an [-a] option used, a TMM process, not a TMBOOT process, will start a server.
    [ -t TMS_name [-k all] ]

    Executes an additional specified TMS process. The number of TMS processes cannot exceed a MAXTMX value defined in a Tmax configuration file.

    [-k all] enables transaction recovery. Because recovery is executed when all groups are terminated and then restarted, recovery is performed by each TMS group. To start and terminate all TMSs with a specific name, use this option.

    [ -B TRB node ]Starts a TRB node.
    [ -T ]Executes only TMM, CLL, CLH, and TMS processes.
    [ -w ]

    Option to start processes sequentially. If no option is used for a tmboot command, all registered server processes will start at the same time. Some server processes may not start normally because certain OSs cannot create sufficient resources.

    • LOCK usage when server processes connect to a TMM (LOCK | NOLOCK)

    • WAIT condition when server processes start (NO-WAIT | FINITE-WAIT)

      • Has the same effect as "-d -1000000 (1sec)".

      • When a [–d] option is used, this option will be ignored.

    [ -d boot_time ]

    Starting multiple server processes simultaneously can cause a problem because a CLH can overload with registration requests. To solve this problem, this option allows a registration interval to be adjusted by specifying the period spent to start server processes. (Default value: LOCK and NO-WAIT, unit: usec)

    • LOCK usage condition when server processes connect to a TMM (LOCK | NOLOCK)

    • WAIT condition when server processes start (NO-WAIT | FINITE-WAIT)

      • -d val < 0: LOCK, |VAL| FINITE-WAIT *

      • -d val = 0: NO-LOCK, NO-WAIT

      • -d val > 0: NO-LOCK, |VAL| FINITE-WAIT

      • When the val of a [–d] option is not 0, (|VAL|) will be used by default. Unit: usec.

    • For a FINITE-WAIT, |VAL| is the maximum WAIT time for each process. It is not the total wait time for all processes.

    • When a server process sends a signal, a WAIT will be released. This means that a next process will be started when a signal is sent even if |VAL| is not reached. If VAL is negative, a LOCK will be used. If this option is used, [-w] options will be ignored.

    [ -D ]Similar to a [-d] option, but for a FINITE-WAIT, a server will unconditionally WAIT until a time specified in a |VAL|, even if a signal is received from a server process.
    [ -e clh | cas | tlm ]

    Starts CLH, CAS, and/or TLM Tmax engine processes. This option is used when an error occurred while using a tmboot command or when an engine process is terminated by a kill command. The tmdown command does not support this option.

    • clh: Starts a CLH.

    • cas: Starts a CAS.

    • tlm: Starts a TLM.

    [ -R ]Starts a Tmax system in a remote node using a remote shell (rsh or remsh).
  • Environment

    This command can be used in a system with a Tmax system installed.

  • Examples

    • The following executes all Tmax processes and application server processes by referring to a <tmconfig> file in a config directory under a TMAXDIR directory:

      $ tmboot
    • The following starts all TMS created with tms_name:

      $ tmboot -t tms_name -k all
    • In the following, a configuration option of a server group is used. When several server groups use the same tms_name, the name of a server group that includes a corresponding TMS can be specified with a [-g] option. If a name is not specified, the TMS of a first server group with a specified name is started.

      $ tmboot -t tms_name -k all -g svgname
    • The following executes all application server processes defined in a SERVER section by referring to a <tmconfig> file:

      $ tmboot -A
    • The following executes application server processes in a cosmo node registered in a NODE section by referring to a <exconfig> configuration file in a /user1/tmax/con directory:

      $ tmboot -n cosmo -f /user1/tmax/con/exconfig
    • The following executes five svr1 processes by referring to a <tmconfig2> configuration file:

      $ tmboot -s svr1 -k 5 -f tmconfig2

Note

For more information about the cfl and tmdown commands, refer to cfl and "2.28. tmdown".

tmconfig path reference in tmboot

When a tmboot command is used to boot Tmax, a <tmconfig> binary configuration file in '$TMAXDIR/config/ is copied to $TMAXDIR/path/ and a configuration file under a $TMAXDIR/path is used. However, if $TMAXDIR/config/tmconfig is referenced to start a specific server with -S or -s options and a Tmax engine is already started, a problem can arise in the environment.

  • Configuration File

    <Original Configuration File>

    *SVRGROUP
    svg1       NODENAME = "tmaxh4"
    *SERVER
    svr1       SVGNAME = svg1
    svr2       SVGNAME = svg1
    *SERVICE
    TOUPPER1   SVRNAME = svr1
    TOUPPER2   SVRNAME = svr2

    <Changed Configuration File during System Operation>

    *SVRGROUP
    svg1       NODENAME = "tmaxh4"
    *SERVER
    svr1       SVGNAME = svg1
    svr3       SVGNAME = svg1
    svr2       SVGNAME = svg1
    *SERVICE
    TOUPPER1   SVRNAME = svr1
    TOUPPER3   SVRNAME = svr3
    TOUPPER2   SVRNAME = svr2

Use CFL to recompile a configuration file that was changed during system operation.

$ cfl –i node1.m

Start a newly added server.

$ tmboot –S svr3

If tmboot -S is used after changing a configuration during runtime, the following error can occur.

(E) BOOT3007 maxsvr (1) is over for svr(svr3:svr2): nodeno = 0, svri = 5, cur = 1, ksvr = 1 [BOOT0015]

When CFL is used in an operating environment, changes are reflected in $TMAXDIR/config/tmconfig but actual shared memory is specified as defined in $TMAXDIR/path/tmconfig. If a newly added server process using tmboot -S is booted, a server process that is already running can be restarted, which can result in a problem. The CFL command is not allowed when a Tmax engine has been started. If CFL is used, the resulting error can cause a critical problem in the system operation and hinder debugging.

The path to a <tmconfig> file referenced when booting each server with a tmboot command with [–S], [-s], [–g], [-q], [-t], and [-A] options during the operation of a Tmax engine does not use $TMAXDIR/config/tmconfig but instead uses $TMAXDIR/path/tmconfig. However, $TMAXDIR/path/tmconfig is referenced when starting the engine.

$ cfl –i new_config.m –o tmchg
$ tmadmin : cfgadd –I tmchg
$ tmboot –S new_svr –f tmchg

Caution

When executing a tmboot, if a specific binary configuration file is designated using a [-f] option, $TMAXDIR/config/tmconfig will be used to start a server. To dynamically add a server, a specific configuration file must be designated by using a [–f] option. The server is then started by using the changed binary configuration file placed in $TMAXDIR/config/.

2.27. tmd

The tmd command is used to test a server program. This allows a programmer to easily check a server program.

Note

This command does not work in Windows NT and Windows 2000.

The buffer types supported by tmd are string, CARRAY, FIELD, and structure. A CARRAY buffer only supports data that can be printed. String and CARRAY data that contains whitespace must be bound by double quotation marks because whitespace indicates end of data. A struct buffer can only support a single structure with matching transmission and reception types. For example, a buffer that has the same buffer type as a receiving buffer must be used as the argument in a tpreturn() function.

If buffer types do not match, the following error message will be displayed.

(E) 3004 not supported output type

  • Usage

    $ tmd [-X] [-T time(sec)] [-t time(sec)] [-s] [-V] 
          [-i file_name][-l size(byte)][-q]
    OptionDescription
    [ -X ]An option to use a transaction. Once this flag is set, a given service will be processed as a transaction.
    [ -T time(sec) ]A transaction timeout value. It has the same functionality as a tx_set_transaction_timeout (time).
    [ -t time(sec) ]A block timeout value. It has same functionality as a tpset_timeout (time).
    [ -s ]Allows tpstart information to be received from a console so user information can be transferred to a system. With this option, a domain password, user name, and user password are required in the event of a tmd.
    [ -V ]Identifies an execution file version.
    [ -i file_name ]Defines a service to invoke.
    [ -l size(byte) ]The number of bytes to be read from each line of a file specified by an [-i] option. Default value: 1024 bytes.
    [ -q ]Handles string data, including \", in a file specified by an [-i] option. \" is replaced with " and treated as a part of a string.
  • Examples

    • The following is an example of using the tmd command:

      $ tmd -i input_data  
      $ tmd -i tmdTest 
      $ tmd -i tmd.sh -s
      $ tmd -i tmdTest -l 4096
    • The example below show a FIELD buffer that starts with an asterisk (*). The first line contains a function name, service name, and buffer type. The following lines list field names and data. As an indication of service execution, 'newline' is entered.

      Create Input File  ( input_data )
      *tpcall BR_ADD FIELD
      BRANCH_ID     1
      LAST_ACCT     9999
      LAST_TELLER   99
      ADDRESS      “25 Powell St. San Francisco, CA 94188”
      PHONE         415-753-9000
      (Newline)
    • When a STRING buffer is used, enter STRING as the buffer type instead of FIELD.

      <tmdTest File Creation Example>

      *tpcall TOUPPER STRING
      abc
      (Newline)

2.28. tmdown

The tmdown command shuts down a Tmax system (or a portion of it). tmdown shuts down a Tmax system by referring to a Tmax configuration file, while a binary Tmax configuration file (a result of compiling 'srcconfig' with 'cfl ': See cfl) must be specified with a path by using a [-f] option.

If a [-f] option is not specified, the <tmconfig> file in a TMAXDIR/config directory will be used by default. If only a [-f] option is used, tmdown will end all Tmax management processes and all server processes registered in the SERVER section of a Tmax configuration file and will remove IPC resources related to a Tmax system. The following is the termination order:

  1. Application server processes registered in the SERVER section are ended.

  2. Any active TMS process in each server group is terminated.

  3. Tmax management processes are terminated: first CLH, second CLL, and then TMM. However, if the MIN value of CLH is not 1, CLL may be terminated before CLH.

It is assumed that a service is dynamically registered in a server and the service is removed from the shared memory because the server is shut down. In this case, if fault tolerance is activated, a naming service cannot be provided for clients that accessed a backup node. (All backup servers are terminated and servers running on normal nodes are restarted.) Therefore, dynamic services of backup servers should not be deleted from shared memory even after a server is shut down.

  • Usage

    $tmdown [-A] [-f binary Tmax configuration file name] 
            [-g servergroup_name] [-h] [-V][-i] 
            [-n node_name] [-p server_num] [-q RQ svg_name] 
            [-s server_name [-k count]] [-S server_name] 
            [-t TMS_name[-k all]] 
            [-w wait_time] [-B Nodename][-R] [-y]

    OptionDescription
    [ -A ]Terminates all application server processes.
    [ -f binary Tmax configuration file name ]A binary Tmax configuration file referred to when shutting down a system. If a file name is not specified, <tmconfig> in the $TMAXDIR/config directory will be used by default.
    [ -g servergroup_name ]Terminates all server processes of a specified server group.
    [ -h ]Shows command line help.
    [ -V ]Shows the version of an executable file.
    [ -i ]Immediately executes the tmdown command. Without an [-i] option, the tmdown command is executed after all current operations are complete. With this option, all processes are unconditionally terminated and tmdown is executed. Use this option carefully.
    [ -n node_name ]Ends server processes of a specific node. The node name must be pre-registered in the NODE section of a Tmax configuration file.
    [ -p server_num ]Ends a specified server process. Unlike a [-s] option, this option ends a specific process using a process number (spr_no), which can be displayed with a "st -p" command through tmadmin.
    [ -q RQ svg_name ]Terminates a RQS.
    [ -s server_name [-k count]]Ends only specified server processes. The server process names must be pre-registered in the SERVER section of a Tmax configuration file. Multiple server processes can be terminated by this option by using a [-k] option to specify the number of server processes. If the number specified in the [-k] option is greater than the number of actual server processes, all processes will be terminated and an error will not occur. If the [-k] option is not used, only a single server process will be terminated.
    [ -S server_name]Terminates all specified server processes.
    [ -t TMS_name [ -k all ]]

    Terminates only a specified TMS process.

    [ -k all ] activates the Transaction Recovery feature. Recovery is performed in a TMS Group unit. This option is used to boot/terminate all TMS that have a specific name.

    [ -w wait_time ]Begins tmdown after wait_time seconds.
    [ -B Nodename ]Terminates a TRB node.
    [ -R ]Used for rolling down.
    [ -y ]Terminates a Tmax system without asking whether or not to terminate (y | n).
  • Examples

    • The following is an example of shutting down an entire Tmax system by referring to a <tmconfig> file in the TMAXDIR/config directory. Tmax management processes and application processes are all terminated.

      $ tmdown
    • The following is an example of shutting down all TMSs named tsm_name.

      $ tmdown -t tms_name -k all
    • The following is an example of using a server group configuration option. If multiple server groups have the same tms_name, use a [–g] option to specify the name of the server group to which the TMS belongs.

      If a server group name is not specified, the first server group with a matching TSM name will be terminated.

      $ tmdown -t tms_name -k all -g svgname
    • The following is an example of shutting down an entire Tmax system by referring to a <tmconfig2> file.

      $ tmdown -f tmconfig2
    • The following is an example of terminating all application server processes in a svr1 by referring to a <tmconfig> file.

      $ tmdown -S svr1
    • The following is an example of forcibly terminating application server processes in a svr1 by referring to a <tmconfig> file. Any server process not terminated immediately can be terminated by using a [-i] option.

      $ tmdown -S svr1 -i
    • The following is an example of forcibly terminating a server process using a <spr_no> by referring to a <tmconfig> file. When there are multiple server processes in a server, only the server process of a server that is in a loop can be forcibly terminated.

      $ tmdown -k <spr_no> -i
    • The following is an example of terminating all application server processes in a 'cosmo' node registered in a NODE section by referring to a <exconfig> file in a '/user1/tmax/con' directory.

      $ tmdown -n cosmo -f /user1/tmax/con/exconfig
    • The following is an example of terminating only one active svr1 process by referring to a <tmconfig2> file.

      $ tmdown -s svr1 -f tmconfig2

Rolling Down

In previous versions of Tmax, when a Tmax system was abnormally terminated while processing client requests, requests being processed were completed but enqueued requests would fail, and an error message was reported. However, Tmax 5 provides the Rolling Down function, which allows a server to reply to all requests (including enqueued requests) before the server terminates.

  • Usage

    $ tmdown –R –n node_name
    OptionDescription
    –n node_nameA node to be terminated.
  • Environment

    This command can be used in a system with a Tmax system installed.

  • Example

    Assume that NODE A and NODE B are part of a multi-node (or multi-domain) system and a total of 100 clients are currently accessing NODE A.

    • When terminating the Tmax system of NODE A:

      $ tmdown –R –n NODEA
      1. A CLL in NODE A blocks a listening port for a client.

      2. A Tmax system in NODE A finishes processing requests currently being handled by a server and then sends the results to the client.

      3. The Tmax system in NODE A sends enqueued requests to NODE B, which is set as TMAX_BACKUP_ADDR.

      4. The Tmax system in NODE A is shut down.

      5. A Tmax system in NODE B handles the requests received from NODE A and directly replies to the client.

      6. All clients connected to NODE A get the normal reply.

    • When terminating Tmax system of NODE B:

      $ tmdown –R –n NODEB
      1. A CLH in NODE A distributes 100 clients requests to NODE A and NODE B equally.

      2. Enter tmdown -R –n NODEB to terminate the Tmax system in NODE B.

      3. A CLL in NODE B blocks a listening port for a client.

      4. The Tmax system in NODE B finishes processing requests currently being handled.

      5. Because the client is connected to NODE A, the Tmax system in NODE B sends the processing results to CLH in NODE A. CLH in NODE A replies to each client.

      6. The Tmax system in NODE B sends enqueued requests to NODE A, which is specified as TMAX_BACKUP_ADDR.

      7. The Tmax system in NODE B is shut down.

      8. The Tmax system in NODE A processes the requests and replies to each client.

      9. All clients connected to NODE A get a normal reply. All 100 clients must get a normal reply.

    Caution

    For NODE B to process client requests instead of NODE A, TMAX_BACKUP_ADDR and TMAX_BACKUP_PORT of the client connected to NODE A must be specified to that of NODE B. Otherwise, when the Tmax system in NODE A is shut down, the enqueued client requests fail and the TPESYSTEM error is reported.

2.29. tmmbfgen

A user-written service information file cannot be read from a web service gateway and xwsdlgen. The file must be converted into the binary format using the tmmbfgen command. A file converted by tmmbfgen is called a service information binary file. tmmbfgen checks syntax and parameter types, which allows validation before sending data to a web service gateway. Moreover, this enables management of text files in sections.

  • Usage

    $ tmmbfgen [-r text_file,] [-i text_file] [-d svc] -o binary_file 
    OptionDescription
    [ -r text_file ]A list of service information files (text).
    [ -i text_file ]Service information files (text).
    [ -d svc ]A list of services to be deleted.
    -o binary_fileA service information binary file (default=sample) to be created (change).
  • Examples

    • The following is an example of creating a new service information binary file. A sample file is created and then service information from sample.txt and sample2.txt is appended to the sample file.

      $ tmmbfgen -r sample.txt,sample2.txt -o sample
    • The following is an example of appending service information to an existing binary file. Service information from <sample.txt> is appended to an existing sample file. If a service is already defined in the sample file, it is overwritten.

      $ tmmbfgen -i sample.txt -o sample
    • The following is an example that removes target services from a binary file. SVC1 and SCV2 services are removed from a sample file.

      $ tmmbfgen -d SVC1,SVC2 -o sample

Note

For more information about the untmmbfgen command, refer to "2.33. untmmbfgen".

2.30. tmsnmpd

In order to enable system configuration and performance queries via the SNMP protocol, Tmax uses tmsnmpd, an SNMP Agent. The SNMP protocol generally uses UDP port 161, which requires root privileges. For regular user account access, port 1024 and higher can be used. Tmax SNMP Agent runs independent of tmboot, similar to how racd runs. These services run regardless of tmboot/tmdown. The TMAXDIR environmental variable must be configured before starting tmsnmpd.

  • Usage

    $ tmsnmpd [[-h | -d| -f config_name | -n node_name | -i env_name | -l| -t| -p| -V] [[protocol:][IP:][PORT]]
    OptionDescription
    [ -h ]Shows command line help.
    [ -d ]Makes tmsnmpd work in debug mode.
    [ -f config_name ]Uses a configuration file in config_file. (Default value: $TMAXDIR/snmp/tmsnmpd.conf)
    [ -n node_name ]The name of a node in multi-node environment.
    [ -i env_name ]The name of an env file.
    [ -l ]A label used in a configuration file.
    [ -t ]The period at which to check a connection to a TMM.
    [ -p ]The period at which to collect performance information.
    [ -V ]Shows version information.
    [ protocol ]Selects either TCP or UDP. (Default value: UDP)
    [ IP ]An IP to be monitored.
    [ PORT ]The listen port of tmsnmpd used by the SNMP utility to connect.
  • Example

    Without using root permission, specify a port to execute tmsnmpd as shown in the below example. It can be specified using agentAddress in <tmsnmpd.conf>.

    $ tmsnmpd 9999

Note

For more information about the tmmbfgen command, refer to "2.29. tmmbfgen".

Tmax SNMP MIB

End users can access Tmax Server properties and statistical data according to a definition defined in a Tmax MIB. MIB is part of SNMP. For more information about MIB refer to www.ietf.org.

  • MIB Browsing

    A Tmax MIB file is located at $TMAXDIR/snmp/mib/TMAXSOFT-TMAXMIB.mib. A MIB file can be opened with a text editor or a 3rd-party MIB browser. Tmax does not provide a MIB browser. A MIB browser can be obtained from SNMP application vendors.

  • Object Identification(OID)

    OID is a series of integers that uniquely identifies objects for management purposes. OID exploits a tree structure to define a path to each object, and OID is defined in a MIB file. If a SNMP packet containing an OID value is sent to a Tmax SNMP Agent, information about the object with the corresponding OID is returned.

The following figure shows the OID tree structure of Tmax’s MIB. The OID of TmaxSoft Enterprise is 1.3.6.1.4.1.14586. The prefix of all of Tmax’s OID is 1.3.6.1.4.1.14586.200.

[Figure 2.2] Tmax SNMP OID Structure

Tmax SNMP OID Structure

  • Note

    Currently only SNMP v1 and v2c are supported. However, its features are limited to composition and performance queries. (Supports READONLY only). SNMP applications, such as snmpget and snmpwalk, can be obtained from OS vendors or via NET-SNMPP (http://net-snmp.sourceforge.net/).

    The example below is of a NET-SNMP command:

    $ nmpwalk –v 2c –c tmax 192.168.1.100:9999 1.3.6.1.4.1.14586.200

Environment Configuration

  • Location

    $TMAXDIR/snmp/tmsnmpd.conf is required in order to use SNMP Agent (tmsnmpd).

  • Configuration

    Specify a community string used for communication such as retrieving information or setting values by using a SNMP utility (snmpget, snmpwalk, etc.). In Tmax 4.0 SP1 and later versions, only rocommunity is allowed. Set rocommunity6 for the IPv6 communication environment.

    rocommunity <string>

  • Example

    To open both IPv4 and IPv6 connections in port 9999 as a UDP with a community name of 'tmax', start tmsnmpd and set the $TMAXDIR/snmp/tmsnmpd.conf file as follows:

    agentAddress udp:9999, udp6:9999
    rocommunity tmax
    rocommunity6 tmax

2.31. tperr

The tperr command provides detailed information about errors by using a Tmax number and error type. Users can use this information to find the cause of an error during Tmax operation.

  • Usage

    $ tperr {-t error type} {-e errno number} [-f filename] [-h] [-V]
    OptionDescription
    { -t error type }An error type. It is a mandatory option that specifies the module name. For more information, see the Error Type table.
    { -e errno number }An error number. It is a mandatory option.
    [ -f filename ]A text file that contains detailed information about an error message. If this option is omitted, $TMAXDIR/bin/_tmax_errno will be used. This file is provided by default.
    [ -h ]Shows command Help.
    [ -V ]Shows version information.

    The following is a list of each error type and its description.

    Error TypeDescription
    TPEA Tmax API Error
    ADMA Tmax Administration Tool (tmadmin)
    BOOTA Tmax Boot-up Tool (tmboot)
    CASA Client Authentication Server Error
    CFLA Tmax Configuration File Compiler Error
    CLHA Client Handler Error
    CLIA Client Library Error (libcli.a, tmax.dll)
    CLLA Client Listener Error
    DOWNA Tmax Shutdown Tool Error (tmdown)
    FDLCA FDL File Compiler Error
    GSTA Service Table Creation Tool Error
    MKPWA Password Management Tool Error
    RACA Remote Access Control Daemon Error
    RQSA Reliable Queue Server Error
    SDLCA SDL File Compiler Error
    SVRA Server Library Error (libsvr.a)
    TCPGWA Custom TCP/IP Gateway Error (libtcpgw.a)
    TMDA Server Application Test Tool (tmd)
    TMGWA Custom TCP/IP Gateway (libtcpgw.a)
    TMMA Tmax Management Error (tmm)
    TMSA TMS Library Error (libtms.a)
  • Environment

    This command can be used in a system with a Tmax system installed.

  • Example

    (E) BOOT3008 server(svr000) is not in config [BOOT0022] 
    
    $ tperr -t BOOT -e 3008 
    [BOOT3008] : server (svr_name) is not in config. 
    Type : ERROR 
    Description : You specified invalid server name. 
    Action : Check the configuration file for valid server names. 
    TPEBADDESC (2) 
    
    $ tperr -t TPE ?e 2 
    [TPE 2] : TPEBADDESC 
    Cause : invalid call descriptor. 
    Solution : After confirm whether cd is valid, must call again tpstart().

Note

For more information about error messages, refer to "Tmax Error Message Reference".

2.32. uncfl

The uncfl command conversely analyzes tmconfig, a binary file created by compiling and converting a text Tmax configuration file, and creates a text configuration file.

This command is useful when a text configuration file is erroneously deleted after compiling and running a configuration file. This command is also useful when checking which configuration file a system is using when multiple configuration files exist. It also it provides a very handy function for dynamic service addition using a cfgadd command from a tmadmin. For more information about the cfadd command, refer to "Tmax Administration Guide".

  • Usage

    $ uncfl [-i binary Tmax configuration file name] [-o text Tmax configuration file name] [-h] [-V]
    OptionDescription
    [ -i binary Tmax configuration file name ]A binary Tmax configuration file used to create a text configuration file. The path to the file can be specified. If a path is not specified, the binary configuration file in a current directory will be used. If this option is omitted, tmconfig will be the binary configuration used.
    [ -o text Tmax configuration file name ]The name of a text Tmax configuration file created by a converse analysis of a binary Tmax configuration file. The path to the file can be specified. If a path is not specified, the file will be created in a current directory. This option is mandatory.
    [ -h ]Shows command Help.
    [ -V ]Shows the version of an executable file.
  • Environment

    This command can be used in a system with a Tmax system installed.

  • Examples

    • Creates a text Tmax configuration file named basic.m in a /user1/tmax/temp directory. The <tmconfig> binary Tmax configuration file located in a current directory is used as the source.

      $ uncfl -o /user1/tmax/temp/basic.m
    • Creates a text Tmax configuration file named <basic.m> in a current directory. The <tmconfig> binary Tmax configuration file located in a /user1/tmax/bin directory is used as the source.

      $ uncfl -i /user1/tmax/bin/tmconfig -o basic.m

Note

For more information about the cfl command, refer to "2.1. cfl".

2.33. untmmbfgen

The untmmbfgen command reverts a service information binary file into a readable text format. For more information, refer to "2.29. tmmbfgen".

  • Usage

    $ untmmbfgen -i binary_meta_file -o text_file  
    OptionDescription
    -i binary_meta_fileA service information binary file.
    -o text_fileA text service information file to be created.
  • Example

    untmmbfgen reverts a service information binary file into a readable text format.

    $ untmmbfgen -i sample -o unsample.txt

2.34. xwsdlgen

The xwsdlgen command creates a WSDL document, which defines web services. Currently there are two versions of WSDL documents: 1.1 and 2.0. xwsdlgen uses a web service gateway configuration file and a service information binary file to create a WSDL document.

  • Usage

    $ xwsdlgen [options] -g wsgw_config_file -m binary_meta_file -o wsdl_file

    • [options]

      OptionDescription
      -w version
      • 0 : WSDL1.1 (default)

      • 1 : WSDL2.0

      -b binding_style
      • 0 : rpc (default)

      • 1 : document

    • Options

      OptionDescription
      -g wsgw_config_fileA web service gateway configuration file.
      -m binary_meta_fileA service information binary file.
      -o wsdl_fileA WSDL file to be created.