Thursday 11 December 2014

bshell options and environmentsettings for Baan

================================================================================
1. Options from the bshell6.x (ntbshell.exe on NT)
   (can also be set with "-- [options] [program...]"
   in the Option Dialog window in bw or BECS)
   (*) = documented in bshell6.2

-appendlog : append to logfile (only useful with -logfile option)
-ba : connect with ba display server
-bx : connect with bx display server
-deftext : show bshell texts
-dbgbdbact : show the Baan database activities initiated from the bshell
-dbgcpu : use debug version of the cpu
-dbgdata : show datainput options (not for fields!)
-dbgenums : show loading of enums
-dbgfdev : debug file access
-dbgfile : show successfully opened sequential files
-dbgflow : show program flow (6.1c.06.03+)
-dbgfun : debug functions
-dbggpvar : debug get & putvar
-dbginstr : show bshell cpu instructions
-dbgjvmi : show JavaVM integration actions
-dbglck : show locking errors
-dbglts : debug Language Translation Support (LTS) X=dump, B=RDD, F=component
-dbgmem : show all memory statistics (see below)
-dbgmemblk : show memory usage per block
-dbgmemfree : show free memory list
-dbgmemtot : show total memory usage
-dbgmemused : show used memory list
-dbgmesg : stop debugger when warning message is sent to the display server (*)
-dbgmulact : show process actions (activate,sleep,kill etc.)
-dbgobj : show object information
-dbgorb : debug ORB (Object Request Broker) integration (where available)
-dbgpty : debug pseudo terminals pty
-dbgref : show reference paths
-dbgrefer : show references
-dbgres : show loaded resources
-dbgsched : debug scheduler
-dbgsrdduse : show srdd usage
-dbgsrv : show bdb server type
-dbgstack : dump 3GL stack traces on function entry
-dbgtss : Show TSS-diagnostics and go to debugger on TSS-error
-deftext : show bshell texts
-delay : delay for seconds before continuing (useful for attaching with a debugger: set breakpoint at the function 'delay_ready')
-dsunicode : communicate with the display driver using Unicode strings (*)
-keeplog : don't remove the logfile after ending the bshell
-logfile : log stdout/stderr output in
-logtag <tag> : used together with -logfile. The <tag> is used in the logfile and is especially useful when logging from multiple bshells (*)
-logtime : add time stamps to bshell log output (combine with -dbgmulact)
-mdebug : display bshell messages sent to display server
-nodebug : disable debugger.
-nolog : stdout and stderr will go to the controlling terminal (if possible - on remote connection no output will appear)
-nounicode : don't read unicode files $BSE/lib/unicode/*.(N2U|U2N). (*)
-r : show resources
-server : run as a server without UI
-set var=val : set environment variable 'var' to 'val' (see below)
-vV : show program version
-windownames : pass unique window names to user interface for testtools (*)

--------------------------------------------------------------------------------
1.1 Unknown options
-auto
-text "vi %s" vi +%d %s

================================================================================
2. With the option "-- -set var=val" you can also pass other
   environment setting to the bshell (and underlaying processes)
   that have a special meaning.

Tracing and Logging:
--------------------------------------------------------------------------------
2.1 "-- -set TT_SQL_TRACE=value (or added values)" Logging
    information from the Baan database driver. Maximum value = 0277367
-set TT_SQL_TRACE=0000001 Parse Query Strings and show information
-set TT_SQL_TRACE=0000002 Show RDD usage of Query
-set TT_SQL_TRACE=0000004 Final Dump info queries
-set TT_SQL_TRACE=0000020 Database Actions ("Operand" "Operator")
-set TT_SQL_TRACE=0000040 Show queries wih their QID
-set TT_SQL_TRACE=0000100 Mode of query
-set TT_SQL_TRACE=0000200 Show query exec. times
-set TT_SQL_TRACE=0001000 Show table dependencies (matrices)
-set TT_SQL_TRACE=0002000 Show calls of internal SQL functions
-set TT_SQL_TRACE=0004000 Show query eval. plan (client+server)
-set TT_SQL_TRACE=0010000 Show quey ev. plan (server)
-set TT_SQL_TRACE=0020000 Show all full table scans
-set TT_SQL_TRACE=0040000 Database Action Messages
-set TT_SQL_TRACE=0200000 Query Distribution Plan
-set TT_SQL_TRACE=0400000 Show current time to level of milliseconds

--------------------------------------------------------------------------------
2.2 "-- -set BDB_DEBUG=value (or added values)" Sets debugging
    link between client and server
-set BDB_DEBUG=0001 Server information
-set BDB_DEBUG=0002 Communication between Server and Client
-set BDB_DEBUG=0004 Show information on currently set locks
-set BDB_DEBUG=0010 Show references between tables
-set BDB_DEBUG=0040 Show all tables using native storage format
-set BDB_DEBUG=0100 Permissions

--------------------------------------------------------------------------------
2.3 "-- -set DBSLOG=value (or added values)" Logging information
    from the online processing of the database driver.
-set DBSLOG=0000001 Data dictionary info of tables
-set DBSLOG=0000002 Query info (SQL level 1)
-set DBSLOG=0000004 Query info (SQL level 2)
-set DBSLOG=0000010 Row action info
-set DBSLOG=0000020 Table action info
-set DBSLOG=0000040 Transaction info
-set DBSLOG=0000100 DBMS input/output data (SQL level 2)
-set DBSLOG=0000200 Admin file info (SQL drivers)
-set DBSLOG=0000400 DBMS SQL statements
-set DBSLOG=0001000 General debug statements
-set DBSLOG=0002000 Query processing info
-set DBSLOG=0004000 Data buffering info (communication)

--------------------------------------------------------------------------------
2.4 "-- -set BLAT=option (may be added and combined)" starts
    Binary Logging And Tracing, spawning the whole range
    from bshell to the database driver (6.1c.06.03+/7.1c.02+)
-set BLAT="off"
-set BLAT="default" default is "t0 s1 t1 s1 t2 s0 t3 s0 th 5 t4 s011 th 5"
-set BLAT="logfile ""<path_and_filename>""" redirects  output to filename (defaults to $BSE/tmp/blat.log)
t0 = proc
-set BLAT="proc s 00" no logging of Baan processes and their hyerarchy
-set BLAT="proc s 01" logging Baan processes and their hyerarchy
t1 = sess
-set BLAT="sess s 000" no logging lifetime of Baan sessions and propagation
-set BLAT="sess s 001" ... on 3GL/BDB level (client)
-set BLAT="sess s 002" ... on DBS level (database driver)
-set BLAT="sess s 004" ... on DBDL level (database driver/RDBMS integration)
-set BLAT="sess s 010" ... on DBS level (audit driver)
t2 = retry
-set BLAT="retry s 00" no logging of handling retry.points
-set BLAT="retry s 01" logging of handling retry.points
t3 = trans
-set BLAT="trans s 000" (commit and abort) transaction related logging off
-set BLAT="trans s 001" ... on 3GL/BDB level (client)
-set BLAT="trans s 002" ... on DBS level (database driver)
-set BLAT="trans s 004" ... on DBDL level (database driver/RDBMS integration)
-set BLAT="trans s 010" ... on DBS level (audit driver)
-set BLAT="trans th value" ... allows logging with threshold value [seconds]
t4 = sql
-set BLAT="sql s 000000" no logging of handling queries
-set BLAT="sql s 000001" ... 3GL/BDB level: Log aggregated information
-set BLAT="sql s 000002" ... 3GL/BDB level: Log all actions
-set BLAT="sql s 000010" ... 3GL/BDB level: Log BaanSQL text
-set BLAT="sql s 000020" ... 3GL/BDB level: Log bind variables
-set BLAT="sql s 000040" ... 3GL/BDB level: Log selected data
-set BLAT="sql s 000100" ... DBdriver Level2: Log aggregated information
-set BLAT="sql s 000200" ... DBdriver Level2: Log all actions
-set BLAT="sql s 001000" ... DBdriver Level2: Log BaanSQL text
-set BLAT="sql s 002000" ... DBdriver Level2: Log bind variables
-set BLAT="sql s 004000" ... DBdriver Level2: Log selected data
-set BLAT="sql s 010000" ... DBdriver Level1: Log aggregated information
-set BLAT="sql th value" ... allows logging with threshold value [seconds]

Note: Processing of the loggings is supposed to be done by using tools. See $BSE/api/blat (and Perl module Blat.pm)
Note2: Instead of spaces as (the default) separator an alternative (set by BLATSEP) can be used to make it possible to have one argument on the environment variable assignment. -set BLATSEP=_
Note3: Not all options are implemented yet
Note4: the value of the threshold will allow only values that exceed the threshold value to be logged, may also be "off" or "default".
Note5: bls6.x converts BLAT logfiles to readable format: open source example included
Note6: btop6.x reads the top <n> queries from the BLAT logfiles (logged with "sql s 011" option).

--------------------------------------------------------------------------------
2.5 "-- -set BAAN_ART_TRACE=[0|1|5]" Set this variable to debug
    the ARTM code in the application scripts.
-set BAAN_ART_TRACE=0 Tracing disabled.
-set BAAN_ART_TRACE=1 Basic tracing. Transactions are shown.
-set BAAN_ART_TRACE=5 The trace information is send to the file $BSE/tmp/bshell.pid.

Common BShell environment settings
--------------------------------------------------------------------------------
2.6 Several common settings that influence the user environment overrule user settings in RDD

-set BAAN_WIN_TITLE=string_value sets a caption for the menu browser other than the default, can be composed with:
    %C Company Name
    %c Company Number
    %h Host Name
    %p Package Combination
    %s Session Code
    %S Session Name
    %u Userid
-set BSE_COMPNR=company to login into specific company, note package combination must match or no difference with current package combination
-set BSE_LANG=value to change language (1=Dutch, 2=English, 3=French, 4=German etc.)
-set BSE_TMP=temporary folder to use a temporary folder other than $BSE/tmp
-set COMP_NR=company same as BSE_COMPNR
-set DS_AS=bshell_name [for ba6.1 only, to specify a specific bshell name from ipc_info] : like setting Bshell Name in bw
-set DS_MAX_WAIT=value the timeout duration [seconds] in which BW has to respond to the sync message, and override the default of 30 seconds
-set DS_TIMEOUT_DETECT=value the timeout duration [minutes] before the bshell starts sending a sync message to BW
-set PACKAGE_COMB=package combination to login into specific package combination
-set SESSION_TIMEOUT=value the number of minutes the bshell can be inactive before it terminates itself, when the timeout is triggered a message is sent to the UI and the bshells stops
-set SUPPRESS_WINHELP=1 if you choose help the baan help appears instead of the windows version of the baan help
-set UI=ascii allows to run bw with an ASCII interface
-set USE_SHM_INFO=value enables or disables shared memory use (*)
-set USER=baan_user to login using a different user (use the same system login with several Baan logins)
-set USR_DBC_RES=file specifies alternative resource file for client to read after the file $BSE/lib/defaults/all is read. Allows to overrule settings in the all file with setting a different value in the specified file

BShell environment settings for specific tasks and applications
--------------------------------------------------------------------------------
2.7 Settings for programmers and other specific tasks
-set AUDIT_FILE_PATH=folder set the location of the audit files
-set BAAN_SCM_GRP=value sets your checkout directory so more everyone that uses the same group can see your changes.
-set BDB_DRIVER=value Sets database specifications
-set BDB_MAX_SERVERS_=value Defines the mechanism for schedule SCHEDULE closing idle server sessions
-set BDB_MAX_SESSION_=value defines mechanism for closing schedule SCHEDULE idle driver sessions
-set BDB_MAX_SESSIONS=value defines number of sessions per driver
-set CUNO_SRC=1 allows for exporting sources (used by Baan PEG with SMT)
-set DBSLOG_LOCK_PROF Specifies lock time above which locks are logged (*)
-set DBSLOG_LOGNAME=file Allows file name to be specified for logging (*)
-set ENABLE_REFMSG=value causes logging of denied update or delete actions (*)
-set LOCK_RETRY=n defines the number of lock retries and the sleep period between retries
-set MAX_RETRY=n the system may return n times to a retry point in case of an abort in an update action, default=10
-set RDS_FULL=value to define max. nr. rows transfered between client and server as one block (good for imports/exports)
-set SSTS_SET_ROWS=value Sets number of rows read ahead (single table single row)
-set TEST_RETRY=n each retry point is triggered n times

dbsinit specifies optimistic or pessimistic reference checking and some MultiByte settings
inf_use_prepare_cache:0 in $BSE/lib/defaults/db_resource turn off the Prepare Statement Cache
-set USR_DBS_RES=file Specifies alternative resource file for server

BShell environment settings that I do not know :-)
--------------------------------------------------------------------------------
2.7 Some unknow variables
-set BMASK=02
-set CORE=
-set LINES=
-set USE_BMASK_AS_ABSOLUTE=1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Output can be generated when having portingset 6.1c.07.03, 7.1d03, 7.3a.04 or
higher by setting in the BECS:

-- -set PROFILE_ALL=1 -set PROF_DIR=/home/bsp

Hereby the most important parameters:
PROFILE_ALL. Setting this parameter to 1 starts profiling for all objects.
PROF_DIR. Redirects the output file to the specified directory. Else it will be placed in BSE_TMP.
PROF_RTIME. When set to 1 to get also a section sorted on wall clock time (real time) will be added.
There are more options, and options will be extended in the near future. This is just a start...

-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
To set in FIN and LOG company in BECs using set command
-set BSE_LOG_COMPNR=785 -set BSE_FIN_COMPNR=785 (>= Tools 7.3a, see solution 141113)

No comments:

Post a Comment