Configuring Runtime
Runtime of ProFrame is operated based on the UNIX system and manages the runtime environment through environment variables, configuration files, and parameters.
1. Setting Environment Variable
Sets not only the required directory path, compile path of ProFrame, and information to control during actual operation, but also the path and information of TmaxSoft Tmax, JEUS, and various DBs.
The configuration file of ProFrame is automatically installed in the directory below when ProFrame is installed, and users must change the file according to each development environment.
$PRJROOT/proframe5.0/package/proframe/pfm/tpl/env
The following describes each item of configuration files.
| Configuration File | Description | |
|---|---|---|
profile |
Environment variable entry file. This profile is read as one of the first configuration files and branched into detailed items according to each equipment. It can define common alias. |
|
Profile.proframe |
Describes the items related to the runtime of ProFrame. |
|
profile.{OS} |
profile.aix profile.hpux profile.hpux_parisc profile.sun profile.linux |
Describes the items to be changed according to OS and device settings. |
profile.{DB} |
profile.oracle profile.tibero |
Describes the items to be changed according to the DB setting. |
profile.{TP} |
profile.tmax profile.tuxedo |
Describes the items to be changed according to the TP-Monitor setting. |
profile.{WAS} |
profile.jeus |
Describes the contents related to the JEUS item for managing the integrated server. |
profile.xml |
Describes XML related items used in ProFrame. |
|
1.1. profile Configuration File
Sets the vendor name and installed path for OS, WAS, TP, and DB products.
The vendors currently supported for each item are as follows:
| Product | Support Vendor |
|---|---|
OS |
hpux, hpux_parisc, aix, sun, linux |
DB |
Oracle or Tibero |
TP |
Tmax, TUXEDO |
WAS |
JEUS |
The following is the content of the actual profile file. Users set "Set VENDOR" part according to the vendor of each product being used.
#!/usr/bin/ksh
##################################################################
# Set PATH and LD_LIBRAYRY
##################################################################
export PATH=$PATH
export LD_LIBRARY_PATH=""
export LIBPATH=""
export LD_LIBRARY_PATH_64=""
##################################################################
# Set VENDOR
# - Set each VENDOR and HOME directory.
#
##################################################################
export OS_VENDOR={Enter OS type. hpux, hpux_parisc, aix, sun, linux }
export DB_VENDOR={Enter DB type. oracle or tibero }
export DB_HOME={Enter the directory of DB HOME. /data/oracle }
export TP_VENDOR={Enter TP-Monitor type. tmax, tuxedo }
#export TP_VERSION=5 # Only used when TMAX version is 4.8 or later
export TP_HOME=$PRJROOT/package/tmax # Modify if the directory of TP-Monitor is different
export WAS_VENDOR=jeus
export WAS_HOME=$PRJROOT/package/jeus # Modify if the directory of JEUS is different
export PFM_HOME=$PRJROOT/package/proframe/pfm
export PFMADM_HOME=$PRJROOT/package/proframe/pfmadm
##################################################################
# Vendor Environment
##################################################################
# Set OS environment variables
. $ENVHOME/profile.$OS_VENDOR
# Set DB environment variables
. $ENVHOME/profile.$DB_VENDOR
# Set TP environment variables
. $ENVHOME/profile.$TP_VENDOR
# Set JEUS envrionment variables
. $ENVHOME/profile.$WAS_VENDOR
# proframe
. $ENVHOME/profile.proframe
# XML Environment set
. $ENVHOME/profile.xml
export PATH=.:$PATH
export LIBPATH=$LIBPATH:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH_64=$LD_LIBRARY_PATH_64:$LD_LIBRARY_PATH
##################################################################
# HOME Environment
##################################################################
export HOMEINC=$HOME/inc
export HOMELIB=$HOME/lib
export HOMEBIN=$HOME/bin
export HOMESHL=$HOME/shl
CDPATH=.:$HOME:$TMAXDIR:$TMAXDIR/log:$PFMROOT:$PFMROOT/tpl; export CDPATH
export OWNER=`whoami`
######## Aliases-1 #########
alias ptpl='cd $PFMROOT/tpl'
alias pinc='cd $PFMROOT/inc'
alias psrc='cd $PFMROOT/src'
alias pbin='cd $PFMROOT/bin'
alias plib='cd $PFMROOT/lib'
alias rm='rm -i'
alias tmax='cd $TMAXDIR'
alias xgrep='find . -name '\''*.[ch]'\''| xargs egrep -n'
#Add extra if alias is needed
1.2. profile.proframe Configuration File
Sets various environment variables used in ProFrame runtime. Various directories, logs, environment setting file locations, DBIO, AMS interworking, etc. are saved in profile.proframe.
###########################################################################
# ProFrame Environment #
###########################################################################
export PFMROOT=$PFM_HOME # Root directory of ProFrame runtime
## For MultiPorject and Workspace/Release Image ##
export PROJECT_ID={Enter project ID (Same as project ID value when logging in to Studio)} # Project ID
export PFMRELDIR_WS=$PRJROOT/ws/release
export PFMWSPOSTFIX=_WS #workspace postfix
## For ProFrame Release ##
export PFMRELDIR=$PRJROOT/release # Root Release directory where AP is located
umask 0000 # Priviliged masking option used when creating file
export LC_ALL=C
export LANG=ko_KR.eucKR # Set CharSet
export PFMTPL=$PFMROOT/tpl # Where the configurations and build config files are located
# Root directory
export PFMLOG=$PRJROOT/logging # Root log directory where log files are created
######## config file Setting ########
export PFMCONFIG=$PFMROOT/cfg # Where various configuration files are located
# Directory
export TCACHECONF=$PFMCONFIG/pfmtcache.cfg # pfmTCache configuration file
export APMMEM_CONF=$PFMCONFIG/apmmem.cfg # sysmaster linked configuration file
######## TCACHE OPTION ########
export PFM_TCACHE_MODE=ON # Set whether to use
# pfmTCache in runtime engine (ON/OFF)
######## TDLSEQ OPTION ########
export PFM_TDLSEQNO_SYNC=OFF # Set whether to use
# tdlcall consistency guarantee logic (ON/OFF)
######## Logging Option ########
export PFMLOGNAMETYPE=0 # SVR_LOG: 0 – Generate log files for each server
# SVC_LOG: 1 – Generate log files for each service in online
# Generate log files for each process in batch
# PRC_LOG: 2 – Generate log files for each process
# Generate log files for each server in batch
# BAT_LOG: 3 – Generate log files for each service in online
# Generate log files for each server in batch
export PFMLOGTYPE=EWITD # Default value of LOG_TYPE
# Log type of PFM_SVC is used in transaction.
export PFMTRACELOGLEVEL=AL # Default value of TRACE_LOG_LEVEL
export PFMDEBUGLOGLEVEL=AL # Default value of DEBUG_LOG_LEVEL
export PFM_USR_LOG_DIR=$PFMLOG/ulog # User log directory
export PFM_USR_LOG_FILE=usr # File name of user log
export PFM_SYS_LOG_DIR=$PFMLOG/slog # System log directory
export PFM_SYS_LOG_FILE=sys # File name of system log
export PFM_ERR_LOG_DIR=$PFMLOG/errlog # Error log directory
export PFM_ERR_LOG_FILE=err # File name of error log
export PFM_CON_LOG_DIR=$PFMLOG/conlog # Console log directory
export PFM_CON_LOG_FILE=con # File name of console log
export PFM_BAT_LOG_DIR=$PFMLOG/batlog # Batch log directory
export PFM_BAT_LOG_FILE=bat # File name of batch log
export PFM_AMS_LOG_DIR=$PFMLOG/amslog # Ams log directory
export PFM_ANAL_LOG_DIR=$PFMLOG/analog #
export PFM_CORE_DIR=$PFMLOG/core # Where the core file will be created when a coredump occurs
export PFM_NLOG_FLAG=ON # ON : PFM_NLOG Macro On
# OFF : PFM_NLOG Macro Off
export PFM_NLOG_DIR=$PFMLOG/nlog
export PFM_NLOG_FILE_NM=ndbg
export PFM_NSLOG_FLAG=OFF # ON : Write slog to User Defined File.
# OFF : Write slog to PFM_SYS_LOG_FILE, default
export PFM_NSLOG_DIR=$PFM_SYS_LOG_DIR/nslog
export PFM_NSLOG_FILE_NM=nslog
export PFM_ADM_LOG=ON # ON : Write call count log to PFM_ADM_LOG table
# OFF : Call count log off. default
export PFM_ULOG_ONLY=0 # 1 : Only write ulog
# 0 : Write all, ulog, slog, elog, conslog analog, default
## For ProFrame ##
export PFMINCDIR=$PFMROOT/inc # Header file directory of ProFrame runtime
export PFMLIBDIR=$PFMROOT/lib # Library directory of ProFrame runtime
export PFMBINDIR=$PFMROOT/bin # Execution file directory of ProFrame runtime
export PFMSHLDIR=$PFMROOT/shl # Shell script file directory of ProFrame runtime
## For ProFrame DBIO ##
export DBIOHOME=$PFMRELDIR/dbio # DBIO ROOT directory
export DBIOSRCDIR=$DBIOHOME/src # DBIO module source directory
export DBIOLOGDIR=$DBIOHOME/log # DBIO log file directory
export DBIOINCDIR=$DBIOHOME/inc # DBIO module header file directory
export DBIOLIBDIR=$DBIOHOME/lib # DBIO module library directory
## For ProFrame Workspace DBIO ##
export DBIOHOME_WS=$PFMRELDIR_WS/dbio # Workspace DBIO ROOT directory
export DBIOSRCDIR_WS=$DBIOHOME_WS/src # Workspace DBIO module source directory
export DBIOLOGDIR_WS=$DBIOHOME_WS/log # Workspace DBIO log file directory
export DBIOINCDIR_WS=$DBIOHOME_WS/inc # Workspace DBIO module header file directory
export DBIOLIBDIR_WS=$DBIOHOME_WS/lib # Workspace DBIO module library directory
export DBIO_DEFAULT_SCHEMA=NPFM # Set DBIO Default Schema
export DBIO_CURTAIL=5 # Maximum length of name when creating DBIO library
# Same as DBIO.CUTLENGTH entry in PFM_CONFIG
## For ProFrame PROMAPPE ##
export PMAPHOME=$PFMRELDIR/pmap # ProMapper ROOT directory
export PMAPSRCDIR=$PMAPHOME/src # ProMapper module source directory
export PMAPINCDIR=$PMAPHOME/inc # ProMapper module header file directory
export PMAPLIBDIR=$PMAPHOME/lib # ProMapper module library directory
export PMAP_DECIMAL_POLICY=err # Trimming/error handling option when ProMapper decimal exceeds
## For ProFrame Workspace PROMAPPE ##
export PMAPHOME_WS=$PFMRELDIR_WS/pmap # Workspace ProMapper ROOT directory
export PMAPSRCDIR_WS=$PMAPHOME_WS/src # Workspace ProMapper module source directory
export PMAPINCDIR_WS=$PMAPHOME_WS/inc # Workspace ProMapper module header file directory
export PMAPLIBDIR_WS=$PMAPHOME_WS/lib # Workspace ProMapper module library directory
## AMS Config
export PFM_AMS_USE_FLAG=SYSMASTER # AMS system options
# (SYSMASTER/OFF)
# Default : OFF
## PATH Assignment ##
export PATH=$PFMBINDIR:$PFMSHLDIR:$PATH
export LD_LIBRARY_PATH=$PFMLIBDIR:$DBIOLIBDIR:$PMAPLIBDIR:$LD_LIBRARY_PATH
## TDLERROR RESTART
export PFM_TDL_TRAN_ERR_RESTART=FALSE # default : FALSE
## TP Server Down, Memory Manager Free Skip ##
export TP_SVR_DOWN_MEM_FREE_SKIP=FALSE
1.3. profile.{OS} Configuration File
Set the environment variables of PATH and LD_LIBRARY_PATH to use OS commands and libraries.
#!/usr/bin/ksh ################################################################## # OS Environment # - Environment variable that must be set in the OS. # If the following contents are set in /etc/profile or PATH, you can remove them. ################################################################## ## PATH Assignment ## export PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/ccs/bin:/opt/langtools/bin:$PATH export LD_LIBRARY_PATH=/usr/lib/hpux64:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH Use for export OBJECT_MODE=64 #AIX
profile.{DB} Configuration File - For Oracle
Sets environment variables required by each DB vendor to use the DB. For detailed description of each environment variable, refer to the manual provided by the DB vendor.
#!/usr/bin/ksh
##################################################################
# DB Environment
# - Environment variables for DB
# - CONNECT_INFO below is the user information
# that is used when batch and server connect to DB in Non-XA format.
##################################################################
export ORACLE_BASE=$DB_HOME
export ORACLE_HOME=$ORACLE_BASE
###################################################################
# You can use the value below as it is, but if there is a problem,
# check the ORACLE installation environment and set it accordingly.
##################################################################
export ORA_NLS33=$ORACLE_HOME/nls/data
export TNS_ADMIN=$ORACLE_HOME/network/admin
export OCIDIR=$ORACLE_HOME/rdbms/public
###################################################################
# Required setting according to ORACLE installation environment
##################################################################
export ORACLE_SID={Oracle sid}
export CONNECT_INFO={access account informationto database}@$ORACLE_SID
###################################################################
# Does not need to be set separately
##################################################################
export ORACLE_TERM=vt220
#export NLS_LANG=American_America.KO16KSC5601
export NLS_LANG=korean_korea.KO16KSC5601
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export TWO_TASK=$ORACLE_SID
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
profile.{DB} Configuration File - For Tibero
Sets environment variables required by each DB vendor to use the DB. For detailed description of each environment variable, refer to the manual provided by the DB vendor.
#!/usr/bin/ksh
##################################################################
# DB Environment
# - Environment variables for DB
# - CONNECT_INFO below is the user information
# that is used when batch and server connect to DB in Non-XA format.
##################################################################
export TIBERO_BASE=$DB_HOME
export TB_HOME=$DB_HOME
export TIBERO_HOME=$TIBERO_BASE_BASE/client
###################################################################
# You can use the value below as it is, but if there is a problem,
# check the ORACLE installation environment and set it accordingly.
##################################################################
export TNS_ADMIN=$TIBERO_HOME/config
###################################################################
# Required setting according to ORACLE installation environment
##################################################################
export TIBERO_SID={Oracle sid}
export CONNECT_INFO={_access account informationto database_}@$TIBERO_SID
###################################################################
# Does not need to be set separately
##################################################################
export NLS_LANG=korean_korea.KO16KSC5601
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
profile.{TP} Configuration File – For Tmax
Sets environment variables required by each TP vendor to use TP-Monitor. For detailed description of each environment variable, refer to the manual provided by the TP vendor.
#!/usr/bin/ksh
##################################################################
# Tmax Environment
# - Modify TMAX_HOST_ADDR and TMAX_HOST_PORT to suit the environment
##################################################################
export TMAX_HOST_ADDR={Describes Tmax access IP}
export TMAX_HOST_PORT={Describes Tmax access port}
##################################################################
# Do not modify if Tmax has been installed by default
##################################################################
export TMAXDIR=$TP_HOME
export TMAX_CONNECT_TIMEOUT=3
export FDLFILE=$TMAXDIR/sample/fdl/tmax.fdl
export TMAX_TRACE=*:ulog
export TDLDIR=$TMAXDIR/tdlcall
## PATH Assignment ##
export PATH=$TMAXDIR/bin:$PATH
#export LD_LIBRARY_PATH=$TMAXDIR/lib64:$LD_LIBRARY_PATH
# In case of 32bit mode, use below:
export LD_LIBRARY_PATH=$TMAXDIR/lib:$LD_LIBRARY_PATH
profile.{WAS} Configuration File – For JEUS
Sets the environment variables required by the WAS vendor to use WAS. Sets the PATH and CLASSPATH environment variables to run JAVA.
################################################################## # Jeus Environment # - Check the directory of JAVA_HOME for it may change depending on the device. ################################################################## export JEUS_HOME=$WAS_HOME export JAVA_HOME=/opt/java1.5 # Describes java directory JAVA version 1.5 or later # PATH Setting export PATH=$JAVA_HOME/bin:$JEUS_HOME/bin:$JEUS_HOME/webserver/bin:$PATH ## CLASS PATH for JAVA and JEUS ## export CLASSPATH=.:$JAVA_HOME/lib/*.jar:$JAVA_HOME/jre/lib/*.jar: $JEUS_HOME/lib/system/jeus.jar export CLASSPATH=$CLASSPATH:$JEUS_HOME/lib/system/webt50.jar
profile.xml Configuration File
Sets environment variables required to use XML parser. Users don’t need to modify the XML parser for it is provided with ProFrame.
#!/usr/bin/ksh ################################################################## # XML Environment # - libxml2 ################################################################## export XML_BASE=$PFMROOT/xml_parser export XML_HOME=$XML_BASE/xml export XML_SOURCE=$XML_BASE/libxml2-2.6.26 ## PATH Assignment ## export PATH=$XML_HOME/bin:$PATH export LD_LIBRARY_PATH=$XML_HOME/lib:$LD_LIBRARY_PATH
2. Configurations
The runtime configuration of ProFrame is divided into two main categories as follows.
The runtime configuration file of ProFrame is automatically installed in the directory below when ProFrame is installed, and users need to change the setting of the configuration file for each development environment.
$PRJROOT/proframe5.0/package/proframe/pfm/cfg
-
Flow configuration file
Controls flow when executing runtime of ProFrame.
-
PFM_CONFIG table
Controls the functions of ProFrame and is placed in DB.
2.1. Flow Configuration Files
Sets the flow control function to change the operation of runtime engine without modifying or compiling the sources.
The detailed description of the Flow configuration file is as follows:
| File Type | Description |
|---|---|
ippr_flow.cfg |
Controls flow of IPPR. |
svc_flow.cfg |
Controls service flow. |
link_flow.cfg |
Controls the internal flow of the connected module. |
exit_flow.cfg |
Controls the flow to transmit a message in case of abnormal termination such as timeout or signal occurrence. |
bat_flow.cfg |
Controls batch flow. |
-
Flow Configuration File (ippr_flow.cfg)
Sets the executing order of each module in performing IPPR. The set modules are executed sequentially, but if an error occurs, it moves to the jump section and executes the error handling routine. Following describes the configuration files of Flow vi using the flow control file of IPPR as an example.
*IPPR_SUCCESS_FLOW #library name function name Error jump section pfmIpprProcess pfmInitializeIppr NULL pfmAmsWrapper pfmAmsInitialize NULL pfmIpprExternalProcess pfmWriteImageLog NULL pfmIpprProcess pfmSetSharedVariable PFM_CATCH1 pfmIpprProcess pfmGetServiceParameter PFM_CATCH10 pfmIpprProcess pfmValidateServiceParameterItem PFM_CATCH11 pfmAmsWrapper pfmAmsSetThresholdFromParameter NULL pfmAmsWrapperExt pfmAmsInitParamInfo NULL pfmAmsWrapper pfmAmsLogStart NULL pfmIpprProcess pfmInitializeHeader PFM_CATCH20 pfmIpprProcess pfmConvertHeaderMessageToStruct PFM_CATCH20 pfmIpprProcess pfmConvertHeaderPostProcessing PFM_CATCH20 pfmIpprExternalProcess pfmConvertHeaderExtensionMessageToStruct PFM_CATCH30 pfmIpprExternalProcess pfmGetServiceExtensionParameter PFM_CATCH40 pfmIpprProcess pfmSetComBufData PFM_CATCH60 pfmAmsWrapper pfmAmsLogEnd NULL *PFM_CATCH1 pfmIpprProcess pfmHandleErrorOfSettingSharedVariable NULL *PFM_CATCH10 pfmIpprProcess pfmInitializeHeader PFM_CATCH20 pfmIpprProcess pfmConvertHeaderMessageToStruct PFM_CATCH20 … pfmOpprExternalProcess pfmComposeOutputMessage PFM_CATCH190 pfmTransactionFrame pfmTransactionFrameRollback PFM_CATCH200 *PFM_CATCH20 … *PFM_CATCH200 …
The items marked with "* (asterisk)" indicate the beginning of a section in the above example. Section refers to each flow name, which designates the position of the next section to jump to when an error occurs.
Following describes the basic steps of flow control file.
-
When a calling function is normal, proceed with the next flow.
-
In case that the calling function has an error, move from the jump section to the defined section and call the defined flow.
-
In case that the section reaches to the end or an error occurs but the jump section is NULL, terminate the flow.
IPPR_SUCCESS_FLOW is defined at the beginning of the part where the flow starts in ippr_flow.cfg. The file displays library name, function name, and jump section name, along with the library name and function name to be called for each, and the section name to be processed in case of an error.
The first function executed in ippr_flow.cfg above calls the pfmInitializeIppr function of the pfmIpprProcess library. If the processing result of the function is normal, it calls the next pfmAmsInitialize function of the pfmAmsWrapper library. If the processing result is not normal, it proceeds with the flow by moving to the section defined in the jump section. As in ippr_flow.cfg, if the jump section is NULL, it means that error processing is finished or error processing is not possible, and then the flow is terminated without further processing.
-
2.2. PFM_CONFIG Table
The DB table, which sets the configurations in runtime operation, is placed in the database of runtime engine.
Various settings such as Offset, Length settings, DBIO, and Center Cut for message analysis controls the operation of runtime engine.
The description of the items set in the PFM_CONFIG table of the DB is as follows. Users can use the environment setting items defined on the site by adding them.
| Configurations | Description |
|---|---|
befimg.useflag |
Whether to use Before Image. (Y/N) |
ccut.checkBizDate |
Whether to check business days during Center Cut. (Y/N) |
DBIO.CUTLENGTH |
Length of the physical name that is cut when creating the DBIO library. (Default value: 6) |
dbio.lastSqlBufSize |
Maximum size of the string returned by pfmDbioGetLastSql(). (Default value: 5000) |
dwio.delimiter |
Delimiter definition to be used in dwlog. (Default value: |+) |
dwio.pre-mdfstr.type |
Unused (Default value: ALL) |
dwio.systimeunit |
Whether micro or nano second logging is performed in the sys_lging_time column of the dwlog table. (Default value: micro) |
dwio.useflag |
Delimiter definition to be used in dwlog. (Y/N) |
inputHeader.custmizeHeader.length |
Length information of the customize header in the input message. (Default value: 290) |
inputHeader.custmizeHeader.offset |
Directory information of the customize header in the input message. (Default value: 256) |
inputHeader.custmizeHeader.structName |
Header structure name used for customize header in the input message. (Default value: PfmCustomizeHeaderStr) |
inputHeader.dataHeader.length |
Length of the data part in the input message. (Default value: -1, Length is not determined.) |
inputHeader.dataHeader.offset |
Directory information of the data in the input message. (Default value: 546) |
inputHeader.proframe.length |
Length information of ProFrame header in the input message. (Default value: 256) |
inputHeader.proframe.offset |
Directory information of ProFrame header in the input message. (Default value: 0) |
inputHeader.proframe.structName |
Structure name of the header to be used for conversion of ProFrame header in the input message. (Default value: PfmSystemHeaderStr) |
inputItem.globalId.length |
Length information of Global ID, which is a required input item. (Default value: 32) |
inputItem.globalId.offset |
Directory information of Global ID. (Default value: 8) |
inputItem.instNo.length |
Length information of inst_no, which is a required input item. (Default value: 4) |
inputItem.instNo.offset |
Directory information of inst_no. (Default value: 64) |
inputItem.txCode.length |
Length information of tx_code, which is a required input item. (Default value: 24) |
inputItem.txCode.offset |
Directory information of tx_code. (Default value: 40) |
pfmAnalysis.analLogHashNum |
Size of hash to be used in Analysis log. (Default value: 1024) |
pfmAnalysis.checkAnalLogFlag |
Whether to use Analysis log. (TRUE/FALSE) |
pfmAnalysis.checkQueryFlag |
Whether to use logging query execution time. (TRUE/FALSE) |
pfmComBuf.deliveryIndexRange |
Forward area definition of Commbuff. It is possible to designate duplicates using a comma (,). (Default value: 0~50) |
pfmConfig.nodeNo.{host name} |
Sets each unique sequence by host name. (Default value: 0~N) |
pfmLog.locale |
Sets locale when using message logging. (Default value: KR) |
pfmMalloc.VarrayAllocErrorType.Batch |
Handles excessive memory usage when using varray in batch.
|
pfmMalloc.VarrayAllocErrorType.Online |
Handles excessive memory usage when using varray online.
|
renumbering.aplog.time.interval |
pfmTpSchedule() time between each cycle when numbering aplog. (Default value: 1 second) |
renumbering.aplog.update.count |
Maximum number of cases processed in a cycle when numbering aplog. (Default value: 100) |
renumbering.cmlog.time.interval |
pfmTpSchedule() time between each cycle when numbering cmlog. (Default value: 1 second) |
renumbering.cmlog.update.count |
Maximum number of cases processed in a cycle when numbering cmlog. (Default value: 1000) |
renumbering.dwlog.time.interval |
pfmTpSchedule() time between each cycle when numbering dwlog.(Default value: 5 seconds) |
renumbering.dwlog.update.count |
Maximum number of cases processed in one cycle when numbering dwlog. (Default value: 1000) |
3. Runtime Parameter Configuration
ProFrame supports the Parameter Driven method for convenience in development or operation.
The following parameters are used to dynamically control the operation of the runtime engine.
| Parameters | Description |
|---|---|
PFM_MSG |
Manages logs and messages. |
PFM_SVC, PFM_SVC_EXT |
Manages online services. |
PFM_SM, PFM_SM_EXT |
Controls service modules. |
PFM_BATCH, PFM_BATCH_EXT |
Controls batch operations. |
3.1. PFM_MSG Table
The log and message parameters use the DB’s PFM_MSG table.
The details of the PFM_MSG table are as follows:
| Column Name | Description |
|---|---|
PROJECT_ID |
Project ID value to identify the project. |
LOCALE |
A regional delimiter. The value is designated when printing in different languages for each region. (Use "KR", "EN", and "JP") |
CHANNEL |
A channel delimiter. The value is designated when printing different messages by dividing them by channel, which is defined and used in the site. (Default value: "PFM") |
CODE |
A code value to be used for logging or messages. |
RTN_VALUE |
The value to be finally returned to the header when an error occurs. (Default value: 99999) |
AREA |
A delimiter used for logging. The value displayed in the second column of logging in type of "(E) PFM: ~~" . |
OUT_TYPE |
The value to designate the output direction when logging.
The value when printing messages.
However, the delimiter is not determined when printing messages. |
MESSAGE |
The actual logging or printing messages. It may be a simple string, but it generally has the meaning of the format used for the printf() type function. |
3.2. PFM_SVC and PFM_SVC_EXT Table
Service parameters use DB’s PFM_SVC and PFM_SVC_EXT tables.
-
PFM_SVC table
his table is installed by default when ProFrame is installed and cannot be customized.
The details of the PFM_SVC table are as follows:
Column Name Description PROJECT_ID
Project ID value to identify projects.
INST_NO
Instrument code.
TX_CODE
Transaction code.
APPLY_SDATE
Application start date. (YYYYMMDD)
APPLY_STIME
Application start time. (HHSS)
APPLY_EDATE
Application end date. (YYYYMMDD)
APPLY_ETIME
Application end time. (HHSS)
STOP_FLAG
Whether to stop. (Y/N)
STOP_SDATE
Stop start date. (YYYYMMDD)
STOP_STIME
Stop start time. (HHSS)
STOP_EDATE
Suspension end date. (YYYYMMDD)
STOP_ETIME
Stop end time.(HHSS)
CALLEE_NAME
Calling module name.
STA_TYPE
Status type.
-
0: Normal
-
1: Abnormal
TX_NAME
Description of transaction code.
SVC_NAME
Name of the service to be called.
DUMMY_SVC_NAME
Service name of the dummy call.
IN_STRUCT_NAME
Input structure name.
IN_MAP_NAME
Input map name.
OUT_STRUCT_NAME
Output structure name.
OUT_MAP_NAME
Output map name.
LOG_TYPE
Log level. (Default value: None)
-
E: Error log
-
W: Warning log
-
I: Info log
-
T: Trace log
-
D: Debug log
-
H: Hex log
AP_LOG_PROCESS
Whether to perform work log.
-
0: For transaction
-
1: For inquiry
-
9: Do not perform (Default value)
ERROR_LOG_PROCESS
Whether to perform work log.
-
0: Perform (Default value)
-
1: Do not perform
TRACE_LOG_LEVEL
Trace log level.
-
AL: All trace
-
DB: DB information trace
-
TP: TP information trace
-
DL: Dlcall information trace
-
TC: Try information trace
-
TS: Sys Try information trace
-
IO: IO information trace
-
CB: CommBuff information trace
-
SV: Svc information trace
-
OF: Turn all off (Default value)
DEBUG_LOG_LEVEL
Debug log level.
-
AL: All
-
IP: Debug IPPR information
-
SV: Debug Svc information
-
SI: Debug Svc Init information
-
SF: Debug Svc Fini information
-
FR: Debug flow module information
-
MO: Turn on all service module
-
MF: Turn off all service module
-
MD: Value of the service module parameter
-
OP: Debug output conversion information
-
OF: Debug off all information (Default value)
TRACE_LEVEL
Trace level.
-
0 : Do not use tracking (Default value)
-
1 : Tracking only for service
-
2 : Service, DBIO
-
3 : Service, DBIO,
-
4 : Service, DBIO, external institution, Dlcall
-
5 : Service, DBIO, external institution, Dlcall, function
THRESHOLD
When linking SysMaster, the transaction whose threshold for transaction execution time exceeds the value is monitored by SysMaster. (Unit: milli second, Default value: 0)
SQL_TRACE_LEVEL
SysMaster integration requirements. (DB performance monitoring)
-
0: Do not monitor (Default value)
-
1: SQL code
-
4: SQL code & variable value
-
8: SQL code & wait time
-
12: ALL (SQL code & variable value & wait time)
-
-
PFM_SVC_EXT table
Customization is available except for the key items “NIST_NO” and “TX_CODE”. As the PFM_SVC_EXT table is an area customized by the site, extra description is omitted.
3.3. PFM_SM and PFM_SM_EXT Table
Service module parameters use PFM_SM and PFM_SM_EXT tables of DB.
-
PFM_SM table
This table is installed by default when ProFrame is installed and cannot be customized.
The details of the PFM_SM table are as follows.
Field Name Description PROJECT_ID
Project ID value to identify projects.
NAME
Service module name.
APPLY_SDATE
Application start date. (YYYYMMDD)
APPLY_STIME
Application start time. (HHSS)
APPLY_EDATE
Application end date. (YYYYMMDD)
APPLY_ETIME
Application end time. (HHSS)
STOP_FLAG
Whether to stop. (Y/N)
STOP_SDATE
Stop start date. (YYYYMMDD)
STOP_STIME
Stop start time.(HHSS)
STOP_EDATE
Suspension end date. (YYYYMMDD)
STOP_ETIME
Stop end time.(HHSS)
DEBUG_LOG_LEVEL
Debug log level in the service module.
-
AL: All
-
SM: Debug service modules
-
SI: Debug service module preprocessing
-
SF: Debug service module post-processing
-
OF: Turn all off (Default value)
-
-
PFM_SM_EXT table
Customization is available except for “NAME”, which is a key item. As the PFM_SM_EXT table is an area customized by the site, extra description is omitted.
3.4. PFM_BATCH and PFM_BATCH_EXT Table
Batch parameters use PFM_BATCH and PFM_BATCH_EXT tables of DB.
-
PFM_BATCH table
This table is installed by default when ProFrame is installed and cannot be customized.
The details of the PFM_BATCH table are as follows.
Column General Batch Resident Batch POD Batch PROJECT_ID
Project ID value to identify project.
BAT_CODE
Batch code.
BAT_PHYSICAL_NAME
Physical name of batch.
BAT_LOGICAL_NAME
Logical name of batch.
STA_TYPE
Status type
-
0: Normal
-
1: Do not use
Status type
-
0: Normal
-
1: Do not use (Download UCS Server)
Status type
-
0: Normal
-
1: Do not use (Download TP Server)
STOP_FLAG
Whether to stop
-
0: Normal
-
1: Stop
Whether to stop
-
0: Normal
-
1: Stop (If the stop flag is set, tpsleep as much as SCHDL_SEC and reload the parameter.)
Whether to stop
-
0: Normal
-
1: Stop
BAT_TYPE
Batch type
-
G: General batch
Batch type
-
U: UCS batch
Batch type
-
P: POD batch
EXEC_NODE
Execution node.
-
ALL: Execute on all nodes.
-
Others (1~N): Execute only on the corresponding node. (N value is pfmConfig.nodeNo.{host name} value set in PFM_CONFIG.)
EXEC_PARALLEL_YN
Whether to execute simultaneously. (Currently not in use.)
ARGS_CTNT
Default value arguments. If no arguments are separately entered when executing the batch, the value set here is used.
SCHDL_SEC
Only resident batches are scheduled. Currently not in use. (Unit: seconds)
Only resident batches are scheduled. In the state of stop flag on, tpusleep(5500000) is executed when 5.5 is eneterd as tpusleep for the number of seconds entered. (Unit: seconds)
Only resident batches are scheduled. Currently not in use. (Unit: seconds)
CALLEE_NAME
Name of the calling task module.
IN_STRUCT_NAME
Input struct name. If it is "dummy", the message is not converted.
IN_MAP_NAME
Map name to use when converting input.
OUT_STRUCT_NAME
Output struct name. If it is "dummy", the message is not converted.
OUT_MAP_NAME
Map name to use when converting output.
AP_LOG_PROCESS
Work log type. Currently not in use.
ERROR_LOG_PROCESS
Error log type. Currently not in use.
LOG_DIR
Log directory setting.
LOG_FILE
Log file name. [stdout] is allowed only for general batch.
Log file name. File name can be set.
LOG_TYPE
Log level. (Default value: EWITD)
-
E: Error log
-
W: Warning log
-
I: Info log
-
T: Trace log
-
D: Debug log
-
H: Hex log
TRACE_LOG_LEVEL
Trace log level.
-
AL: All trace
-
DB: DB information trace
-
TP: TP information trace
-
DL: Dlcall information trace
-
TC: Try information trace
-
TS: sys Try information trace
-
IO: IO information trace
-
CB: CommBuffer information trace
-
SV: Svc information trace
-
OF: All off (Default value)
DEBUG_LOG_LEVEL
Debug log level.
-
AL: All
-
SV: Debug Svc information
-
FR: Debug flow module information
-
MO: Turn all service modules on
-
MF: Turn all service modules off
-
OF: Turn all debug information off (Default value)
JOB_INFO_FLAG
Determines whether to perform JOB INFO.
-
0: Perform
-
1: Do not perform
TRACE_LEVEL
SysMaster trace log level. Currently not in use.
THRESHOLD
SysMaster threshold. Currently not in use.
SQL_TRACE_LEVEL
SysMaster DB monitoring level. Currently not in use.
-
-
PFM_BATCH_EXT table
Customization is available except for “BAT_CODE”, which is a key item. As the PFM_BATCH_EXT table is an area customized by the site, extra description is omitted.
4. pfmTCache Management
pfmTCache is a utility that guarantees ProFrame performance by caching the information fetched from DB during ProFrame operation in Shared Memory.
pfmTCache can change information about memory items to be managed by pfmTCache by using the configuration file, and can perform operations such as creation and deletion of shared memory managed by pfmTCache using pfmtcacheadmin.
4.1. pfmTCache Configuration
To use pfmTCache, environment variables and environment configuration files must be registered. Environment variables are registered in $PFMTPL/env/profile.proframe.
pfmtcache.cfg is located under the environment variable “PFMCONFIG” folder.
export TCACHECONF=$PFMCONFIG/pfmtcache.cfg
The contents of the pfmtcache.cfg file are as follows (the line beginning with "#" is the comment line, and the rest is the configuration part):
# the configuration file of TCACHE
SHMKEY=0x70005 # the key of Shared Memory
IPCPERM=0777 # permission of the Shared Memory
SIZE_LOCAL=0 # L1 cache size in kilo-bytes
LIB_PTHREAD=libpthread.so # the pthread library file name
INVALIDATE_TYPE=0 # Invalidate type 0:multi-node 1:multi-domain
AGENT_SVC=SPFMAGENT # multi-node sync. svc
#INVALIDATE_TYPE=1
#AGENT_SVC=SPFMAGENT|3 # multi-domain sync. svc
#SPFMAGENT|3 = SPFMAGENT01, SPFMAGENT02, SPFMAGENT03
# cache for PFM_SVC
CACHE_NAME=PFM_SVC
SIZE_MEM=65536 # the total cache memory size in kilo-bytes
SIZE_HASH=1024 # the number of hash key (MAX=65536)
SIZE_KEY=30 # the number of digits of the index column
SIZE_REC=2048 # the size of a single record in bytes
INV_TIMEOUT=10 # invalidation timeout in sec
# cache for PFM_SVC_EXT
CACHE_NAME=PFM_SVC_EXT
SIZE_MEM=65536 # the total cache memory size in kilo-bytes
SIZE_HASH=1024 # the number of hash key (MAX=65536)
SIZE_KEY=30 # the number of digits of the index column
SIZE_REC=2048 # the size of a single record in bytes
INV_TIMEOUT=10 # invalidation timeout in sec
# cache for PFM_SVC
CACHE_NAME=PFM_SM
SIZE_MEM=65536 # the total cache memory size in kilo-bytes
SIZE_HASH=1024 # the number of hash key (MAX=65536)
SIZE_KEY=33 # the number of digits of the index column
SIZE_REC=2048 # the size of a single record in bytes
INV_TIMEOUT=10 # invalidation timeout in sec
# cache for PFM_SVC_EXT
CACHE_NAME=PFM_SM_EXT
SIZE_MEM=65536 # the total cache memory size in kilo-bytes
SIZE_HASH=1024 # the number of hash key (MAX=65536)
SIZE_KEY=33 # the number of digits of the index column
SIZE_REC=2048 # the size of a single record in bytes
INV_TIMEOUT=10 # invalidation timeout in sec
# cache for PFM_MSG
CACHE_NAME=PFM_MSG
SIZE_MEM=65536 # the total cache memory size in kilo-bytes
SIZE_HASH=1024 # the number of hash key (MAX=65536)
SIZE_KEY=66 # the number of digits of the index column
SIZE_REC=2048 # the size of a single record in bytes
INV_TIMEOUT=10 # invalidation timeout in sec
# cache for PFM_CONFIG
CACHE_NAME=PFM_CONFIG
SIZE_MEM=65536 # the total cache memory size in kilo-bytes
SIZE_HASH=1024 # the number of hash key (MAX=65536)
SIZE_KEY=128 # the number of digits of the index column
SIZE_REC=2048 # the size of a single record in bytes
INV_TIMEOUT=10 # invalidation timeout in sec
The following is a description of each setting item.
-
TCache common area
Item Description SHMKEY
Saves the location of Shared Memory to cache.
IPCPERM
Sets the access authority of Shared Memory.
INV-TIMEOUT
Sets the time-out in invalidating TCache. (Unit: seconds)
FORCE_LOCAL
Other settings for the TCache environment.
LIB_PTHREAD
File name of Pthread library.
-
#TCache individual area
Item Description CACHE_NAME
Representative cache name to use when call TCache.
SIZE_MEM
Total amount record of memory to be used by TCache. (Unit: kilobytes)
SIZE_HASH
Total number of hash tables in TCache. (Maximum: 65536)
SIZE_KEY
Number of digits in hash key of TCache.
SIZE_REC
Maximum size of 1 slot in TCache’s hash table. (Unit: bytes)
4.2. pfmTCache Management Utility (pfmtcacheadmin)
pfmTCache is managed through the following command.
-
Creating pfmTCache
Creates pfmTCache. However, if TCache is already loaded in Shared Memory, no operation is performed.
$> pfmtcacheadmin –c -
Deleting pfmTCache
Deletes pfmTCache. However, only the user who started TCache for the first time can execute the delete command.
$> pfmtcacheadmin -d -
Recreating pfmTCache
Deletes pfmTCache (pfmtcacheadmin -d) and then creates it again (pfmtcacheadmin -c).
$> pfmtcacheadmin –r -
Pausing pfmTCache
Temporarily disables the pfmTCache API while preserving the cache data stored in pfmTCache.
$> pfmtcacheadmin -tTo change it to use again, execute the command again.
-
Initializing partial entry of pfmTCache
Initializes all data of pfmTCache corresponding to cacheName.
$> pfmtcacheadmin -i [cacheName]cacheName is the name defined in "CACHE_NAME" of pfmtcache.cfg. When there are multiple caches, it is used to initialize one specific cache area.
-
Querying status information of pfmTCache
Reports on the operation of pfmTCache. It shows memory usage status, pfmTCache operation status, and the number of cache hit and miss.
$> pfmtcacheadmin -s
5. tdlcall Management
tdlcall is a binary that enables libraries from ProFrame to dynamically change online and during batch program execution.
tdlcall consists of a management binary to manage shared memory and a shared library to access when executing a program.
|
This section does not explain how to use the API to access when tdlcall is executed, but only describes how to manage tdlcall. For calling module with tdlcall, refer to ProFrame C Online Programming Guide. |
5.1. tdlcall Configuration
To use tdlcall, you need to register environment variables and configuration files. Environment variables are registered in $PFMTPL/env/profile.tmax.
tdl.cfg is located under the environment variable TDLDIR folder as follows:
export TDLDIR=$TMAXDIR/tdlcall
|
For versions after Tmax 5.0, tdlcall is included in Tmax and can read the tdl.cfg file in the TDLDIR/config directory. For details, refer to 'Dynamic Library' of Tmax Programming Guide. |
The contents of the tdl.cfg file are as follows (the line starting with "#" is the comment line, and the rest is the configuration part):
# shared memory version (1|1D|2|2D|3)
VERSION=3
# shared memory key
SHMKEY={shared memory address, 0x90000}
# shared memory and file creation permission
IPCPERM=0777
# number of dynamic loadable modules, rouded up to powers of 2
MAXMODULES={Define the maximum number of functions to call. 204800}
# shared memory backup
BACKUP=tdl.shm
# path of a command file for searching export functions
#COMMAND=tdlcmd
# path of a log directory
#LOGDIR=log
The detailed description of tdl.cfg is as follows:
| Item | Description |
|---|---|
VERSION |
tdlcall Shared Memory version. Multiple functions are available in one library if it is version 2 or higher, or if it is 2D. |
SHMKEY |
Only key of Shared Memory used when operating tdlcall. |
IPCPERM |
Runtime copy ($TDLDIR/run/*) of the dynamic module and the authority of the shared memory. |
MAXMODULES |
Maximum number of dynamic modules to be placed in $TDLDIR/mod. The value is rounded up to 2^n. |
COMMAND |
Command setting file name for automatically extracting the export function from the library. You can specify a full pathname or just a file name (found in $TDLDIR/bin/). |
BACKUP |
When tdlinit and tdlupdate are performed, TDL Shared Memory is automatically backed up to the designated file. |
LOGDIR |
Specifies the path to the utility error and information message logging directory. It takes precedence over $TDLLOGDIR. |
5.2. tdlcall Management
Following commands are management tools for tdlcall.
|
For more about tdlcall, refer to 'Dynamic Library' of Tmax Programming Guide |
tdlinit
Initializes the tdlcall environment.
Initializes the shared memory by reading the $TDLDIR/tdl.cfg file and the dynamic modules located under $TDLDIR/mod and initializes the $TDLDIR/run directory to use it in operation.
-
Usage
$> tdlinit [-p tdldir] [-f] [-b | -B backupfile [-i]]Option Description [-p tdldir]
It is used when $TDLDIR is given as an argument without reading from the environment variable.
[-f]
Forced initialization option. tdlinit checks the Shared Memory and, if tdlcall is in use, terminates it without initialization. If the -f option is used, it is initialized regardless of the use.
[-b]
If the -b option is selected during tdlinit, the Shared Memory is loaded from the backup file to provide fast initialization (fast-tdlinit). However, backup parameters must be specified and the backup file must also exist.
[-B backupfile]
It provides fast initialization (fast-tdlinit) by loading the Shared Memory from a backup file during tdlinit. Backup parameters do not need to be specified.
[-i]
After loading the Shared Memory from backup file, check whether the library exists in the $TDLDIR/run directory. (Use with -b, -B options)
ProFrame provides tdlinit.sh to use tdlinit conveniently.
$> tdlinit.sh
tdlinit.sh checks the existence of libraries under $TDLDIR/mod, removes nonexistent libraries, and then executes tdlinit.
tdlupdate
Registers the library to tdlcall administrator.
tdlupdate registers the library under $TDLDIR/mod to the tdlcall memory manager and copies the library to the $TDLDIR/run directory.
-
Usage
$> tdlupdate –m {library name_exclude extension}
ProFrame provides pfmdlupdate for convenient use of tdlupdate. pfmdlupdate copies the input library to the specified path, creates a link in $TDLDIR/mod, and executes tdlupdate.
-
Usage
$> pfmdlupdate {library name}
tdlclean
Removes libraries that are no longer used among libraries managed by tdlcall.
tdlclean is a tool that cleans up unnecessary files remaining in the $TDLDIR/run directory after updating module. It refers to Shared Memory and deletes files that are not currently in use.
-
Usage
$> tdlclean [-p tdldir] [-m library_name | -M module_name [-b]] [-d yyyymmddhhmi] [-D "num hour|day"] [-n num]Option Description [-p tdldir]
It is used when $TDLDIR is given as an argument without reading from the environment variable.
[-m library_name]
Deletes the specified library in Shared Memory and related files in the run directory.
[-M module_name]
Deletes the relevant function in the Shared Memory, and does not delete the related files in the run directory. (Same function as the -m option when version=1|1D.)
[-b]
If a backup parameter is specified, tdlclean automatically maintains a backup file. If you do not want to back up, specify the -b option. (Use with -m, -M option)
[-d yyyymmddhhmi]
Deletes the previous version library before the time specified by yyyymmddhhmi.
[-D "num hour|day"]
Deletes previous versions of the library older than num hours|days.
[-n num]
Leaves only num libraries and deletes the rest of the previous version libraries.
(n >= 1)
tdlseqno
Searches for the sequence number of functions under tdlcall management.
-
Usage
$> tdlseqno [-p tdldir] -m module_name | -M library_nameOption Description [-p tdldir]
It is used when $TDLDIR is given as an argument without reading from the environment variable.
-m module_name
Name of the module whose information you want to see.
-M library_name
Name of the library whose information you want to view, minus the shared module extension .so.
tdlrm
Deletes the Shared Memory managing tdlcall.
-
Usage
$> tdlrm [-p tdldir]Option Description [-p tdldir]
It is used when $TDLDIR is given as an argument without reading from the environment variable.
tdlnm
Searches for the function list extracted from the library.
-
Usage
$> tdlnm [-p tdldir] -m library_nameOption Description [-p tdldir]
It is used when $TDLDIR is given as an argument without reading from the environment variable.
-m library_name
This is the name of the updated module, minus the shared module extension .sl.
tdlsync
Backs up TDL Shared Memory. Backup parameters are backed up to the specified file. If you want to back up to another file, use the -B option.
-
Usage
$> tdlsync [-p tdldir] [-B backupfile]Option Description [-p tdldir]
It is used when $TDLDIR is given as an argument without reading from the environment variable.
[-B backupfile]
Specifies the file to be backed up.