Run time debugging of bshell (ttstpbshdebug)

Use this session to set or modify the various bshell debug options on runtime.

In on-premises and single-tenant cloud environments, you can also set these bshell debug options before runtime in the user profiles. To edit your user profile, select Options > Settings. Click the default profile name.

The session is intended for advanced users, who have LN programming experience and are familiar with the functionality of the Bshell.

The session contains these main groups or form tabs:

  • General options
  • Bshell Debug Levels
  • BDB/SQL Tracing (BDB = LN Data Base Tracing, SQL = Query Processor Tracing)
  • Database Logging

Logging information

The database logging information is stored in the dbs.<pid>.log file. This file is stored in the current working directory. In a multitenant cloud environment, this is the AppData folder of the tenant (%APPDATA%).

The logging information of the Bshell and the BDB/SQL Tracing is stored in an ASCII file. By default, the logging info is stored in the bshell.<%h>.<%u>.<%p>.<%r>.txt.gz file in the $BSE/tmp directory.

This table shows the variable elements in the file name:

Element Description
<%h> The hostname or machine ID in the cloud.
<%u> The LN user name.
<%p> The process ID of the bshell.
<%r> A random number.

The file is compressed and has a .gz extension.

On exit of the Bshell, the log file is deleted unless the Keep trace file after exit check box is selected.

To interpret the logging information:

  1. Uncompress the bshell.<%h>.<%u>.<%p>.<%r>.txt.gz file. The bshell.<%h>.<%u>.<%p>.<%r>.txt is generated.
  2. Open the bshell.<%h>.<%u>.<%p>.<%r>.txt file with an ASCII display utility or ASCII editor.

Usually, the trace output is first buffered and compressed, and is then written to the file. In exceptional situations, such as a hard crash of the bshell, the buffered data is not written to the file.

Actions/Reference menu

These options are available:

Start Trace
Starts the trace functionality.
Stop Trace
Stops the trace functionality.
Pause Trace
Pauses the trace functionality.
Resume Trace
Resumes the trace functionality.
Download File
You can download the log file to the client. This can be useful when working in the cloud. Before you can download the file, you must stop the logging and tracing.
Download BOD Trace
You can download the BOD trace log file to the client. This can be useful when working in the cloud.
Dump Process List

Click this button to write all currently running processes in the Bshell to the Bshell log file.

Memory Totals
This button refers to the Bshell option -dbgmemtot

Click this button to write the Memory Totals to the Bshell log file.

Free Memory
This button refers to the Bshell option -dbgmemfree.

Click this button to write the free memory list to the Bshell log file.

Memory Used
This button refers to the Bshell option -dbgmemused.

Click this button to write the used memory list to the Bshell log file.

Memory Block List
This button refers to the Bshell option -dbgmemblk.

Click this button to write the memory usage per block to the Bshell log file.

All Memory Info
This button refers to the Bshell option -dbgmem.

Click this button to write all memory statistics to the Bshell log file.

Display Shared Mem
Click this button to write the shared memory information to the Bshell log file.
Mem Col Snapshot

Click this button to trace memory usage on specific moments, such as process start, process end, and object loading. The trace is technical but useful in finding memory usage issues.

Write Remark to Log
Click this button to write the Remark text to the Bshell log file.

Related information

  • Infor Enterprise Server - Technical Reference Guide for EnterpriseDB Driver

Field Information

General Options
show trace in Message Window

Besides normal saving the logging data in the Bshell log file, the logging information will also be sent to the BW Message Window.

BW Messages to trace

This check box refers to the Bshell option -dbgmesg.

The Debug on BW Message attempts to stop the current process if the process is compiled in debug. This feature will allow the programmer to determine where and when a BW message is generated.

Log messages to trace

The log messages that are normally sent to the $BSE/log/log.bshell6.2 are also sent to the bshell trace file.

Bshell messages to trace

This check box refers to the Bshell option -mdebug.

Sends Bshell messages normally displayed in the BW message window also to the bshell trace file.

Trace Level

This check box refers to the Bshell option -tracelevel <value>.

It is possible to specify a trace level to allow granularity of tracing. This allows better control over the reproduced amount of data. There are four trace levels. Each subsequent level provides a greater amount of detail. The levels are 0, 1, 2, and 3.

Example with these tracings enabled: “Show object information” (-dbgobj) “Show Symbol Loading” (-dbgsym) “Program Flow” (-dbgflow):

Tracelevel 0: This will give information about the allocated memory per object/function.

Tracelevel 1: By using this trace level, you can determine the number of bytes used for static allocation using declaration (as opposed to dynamic memory allocations with alloc.mem() ). In this situation, tracelevel 1 prints the size of the bytes of the types, including the external types. So, tracelevel 1 specifies exactly for each symbol (variable) how much memory is allocated.

Tracelevel 2: When using tracelevel 2, the local and static symbols allocated are also shown. The names of the local and static symbols are “optimized away” by the bic compiler. At level 2, it becomes clear where and how much symbol memory is allocated for local symbols, external symbols, and for function arguments, (no function argument symbols).

Example with -dbgfun in combination with -dbgcpu:

The functions in LN have globally two levels of the functions: 3GL/4GL functions and bshell functions. The 3GL/4GL functions are covered with -dbgflow. The bshell function trace is covered with -dbgcpu, -dbgfun and the tracelevels.

Tracelevel 0 - This only prints the bshell functions.

Tracelevel 1 - Prints the bshell functions with parameters and its return value. - The error value “e” is also printed when modified within the bshell.

Tracelevel 2 - This level includes the symbol names, when available. - The error value “e” is also printed when modified within the bshell.

Tracelevel 3 - This level prints the source line number with the source name when the object is in debug. - The error value “e” is also printed when modified within the bshell.

Keep trace file after exit

This check box refers to the Bshell option -keeplog.

If this check box is selected, the Bshell log file is not deleted on exit of the Bshell.

Disable Buffering

If this check box is selected, the trace output is not buffered. Each line of the trace output is immediately written to the trace file. This may significantly reduce the performance for some, slow, file systems.

We recommend that you select this check box only in these situations:

  • You expect a hard crash.
  • The last part of the trace file is missing because the bshell is 'hanging'.

If this check box is cleared, the trace output is buffered and compressed, and is written to the file. In exceptional situations, such as a hard crash of the bshell, the buffered data is not written to the file.

Add Time stamps

This check box refers to the Bshell option -logtime.

Add time stamps to Bshell log output.

Log name

This check box refers to the Bshell option -logfile <file>.

The name and path of the ASCII logfile, by default $BSE/tmp/bshell.<%h>.<%u>.<%p>.<%r>.txt.gz. This field is read-only.

You can set the path and file name of the log file in the user profiles through the -logfile option. To edit your user profile, select Options > Settings and click the default profile name.

Remark

Here you can type remarks you want to write to the log file. The Remark text is written to the log file after clicking the Remark to Log button.

Bshell Debug Levels
Debug Functions

This check box refers to the Bshell option -dbgfun.

This option gives information about the Bshell functions that are used. This option must be used in conjunction with -dbgcpu. Dbgfun only gives the object that is started, with the pid of that object. By adding –dbgcpu, the bshell function who is called in that object is logged in addition. If a new object is started, this is added to the file. For old objects, the pid is used. The functions that are used are only bshell functions and not the functions of applications.

Debug Cpu

This check box refers to the Bshell option -dbgcpu.

This trace option switches the debug version of the bshell CPU on. The bshell cpu is the kernel of the bshell, executing all kind of tasks. Especially in case of bshell problems, this tracing can be useful. This option is used in combination with other loggings.

Debug Instructions

This check box refers to the Bshell option -dbginstr.

This option logs the Bshell VM CPU instructions. Only for very experienced bshell users.

Dump Stack Traces

This check box refers to the Bshell option -dbgstack.

This option logs the stacktrace for each 3/4GL function, and is used in combination with -dbgcpu. In case the 3/4GL object is not in debug mode, the stacktrace will only show internal 'IDs' instead of function names.

Getvar/Putvar debug

This check box refers to the Bshell option -dbggpvar.

Trace information regarding getting and putting variables. A 3/4GL program can request a variable from another process using get.var(). And a 3/4GL program can assign a new value to a variable of another process using put.var(). These actions are logged using this trace option.

Program Flow

This check box refers to the Bshell option -dbgflow.

Using this Debug option, the 3GL function flow, with function names or numbers, and object names are logged. This information gives you insight into how the program flow was, and which functions were called from which place. In case the objects are compiled in debug mode, the function names themselves are logged, otherwise function numbers are logged.

Debug Java VM Integration

This check box refers to the Bshell option -dbgjvmi.

This option logs the JavaVM integration actions.

Show object information

This check box refers to the Bshell option -dbgobj.

This option logs the information of the objects that are used. First, we will get the object’s name and the pathname where it is stored. With this option, you can see which version is used and then a check can be done to see whether this is the latest version that must be used. Then, there is also some information on the object such as release number and revision number. This information is set in the object during compilation. Furthermore, we have some information about the number of bytes used within the object.

Show SRDD use

This check box refers to the Bshell option -dbgsrdduse.

This option is used to see where the objects are loaded from; disk or memory. On UNIX, all objects are loaded from disc first. If they are used again, you can load them from memory. On Windows, the objects stay in memory. Only after a fresh start of Windows, the objects are loaded from disc. This only applies to objects that are in the $BSE/lib/srdd_init file. In this file, you can specify which files must be loaded in memory.

Debug TSS

This check box refers to the Bshell option -dbgtss.

This option logs information about Triton Super Set.

The multibyte enabling is implemented in LN by means of the Triton Super Set (TSS), which is a collection of character sets. TSS accommodates all multibyte character sets in a single package. TSS includes both ASCII character sets and multibyte character sets, such as Japanese, Chinese, and Hebrew. To distinguish between, for example, Japanese and Chinese, TSS consists of planes, each of which holds a 64 KB-size character set, or 256 pages of 256 characters.

Debug data.input()

This check box refers to the Bshell option -dbgdata.

Logs the user data input that is handled by function data.input(). like the next command (n) in the “general maintenance session” (ttaad4100).

Debug Resources

This check box refers to the Bshell option -dbgres.

This trace option shows all resources loaded by the bshell. Resources are coming from environment variables set. From files such as $BSE/lib/default/all,$BSE/lib/user/u<username> and so on.

Debug Expressions

This check box refers to the Bshell option -dbgyy.

Tracing of the bshell expressions as used in expr.compile/l.expr/d.expr/s.expr$ calls (see the Infor ES Programmers Guide (Infor Support Portal KB 22924522)).

Show Symbol Information

This check box refers to the Bshell option -dbgsym.

Show Symbol Info allows a more specific tracing when tracing the allocation and reading of symbols.

Remark: when having Show Symbol Info set only, nothing is logged, it only makes sense in combination with other loggings.

Debug cURL

If this check box is selected, the internal cURL tracing in the bshell is enabled.

Debug Inbound BODs

If this check box is selected, you can create log files that provide details of the events in the BOD/BDE Dispatcher and BOD retries that occur when BODs are published from ION to LN.

To enable the creation of these log files, complete these steps:

  1. Select the current check box and click OK in the dialog box in which the message "Setting must be saved for ION user to enable debug of Inbound BODs" is displayed.
  2. To enable this option for an ION user who is not identical to the current user, on the User Start Options tab, select the relevant ION user, for example, ion_ln, in the User: field.
  3. Click the Save Setting User button.
  4. If you also want to log BOD retry handling, click Yes when asked if BOD retry handling must be logged.
  5. Click OK in the dialog box in which this message is displayed: “Setting ‘Debug Inbound BODs’ has been saved. The bshells for ION user must be restarted to take effect.”
  6. Go to ION and reactivate the data flows that you want to log. This restarts the ION bshells with the new setting. Optionally, for non-production environments, you can achieve the same result by killing the ion_ln bshells from the Active Users (ttaad2560m000) session.
  7. To download the log files, on the General Options tab, click Download BOD Trace.
Show opened files

This check box refers to the Bshell option -dbgfile.

In comparison with “Debug file access” (-dbgfdev), this tracing only shows the successfully opened files.

Debug file access

This check box refers to the Bshell option -dbgfdev.

With this option, the files to be accessed are logged. The place where the files should appear is given, also, when an error occurs, such as a read permission, this error is logged. You can get an error 2 because the file does not exist, or an error 13, when the permission is not correct. By starting the LN menu browser, the bshell searches for files with default information, in the $BSE/lib/default directory. It is not required to have these files, so it is not always necessary that the errno is 0.

Debug LTS

This check box refers to the Bshell option -dbglts.

LTS provides a mechanism to store translatable software components, such as labels, questions, and messages separate from language-independent software components, such as form and report designs. For example, a sales order entry form contains only an identifier to a referring label and is used by all system languages. The translated labels are added only to display the form.

This option shows from which location the labels are read.

It is visible by the first character of each label that is displayed in this session (ttstpbshdebug). The labels can start with these characters:

  • X (Inde X label dump files) Labels are read from the runtime labels database in the directory $BSE/labels.
  • B (Data B ase) Labels are read from the develop time labels database from table ttadv140.
  • F ( F allback) Labels are read from the form or report object in the directory $BSE/application (default).

Note: No further information is stored in the Bshell log file.

Debug Scheduler

This check box refers to the Bshell option -dbgsched.

This trace option logs information about scheduling of processes by the bshell. This option is only interesting in case of low-level problems regarding process scheduling.

Show process actions

This check box refers to the Bshell option -dbgmulact.

This trace option gives information that occurs with the processes. When a session is started, this is a new process in the bshell. Processes can be activated, sleeping, killed, or can communicate with each other (send_bms and receive_bms). All this information regarding the processes is logged with this option.

Trace Listed Bshell Functions

Use this field to trace specific bshell functions. The list is comma-separated.

For example, to trace xml functions in combination with memory functions, use this sample syntax:

xml.*,alloc.mem,free.mem

The asterisk at the end is used to trace multiple functions. For example, xml.* traces all xml functions and seq.* traces all file operations.

The syntax used here is NOT a regular expression.

BDB/SQL Tracing
Driver Type

This check box refers to the Bshell variable setting BDB_DEBUG=0001.

This option logs the database drivers and parameters currently in use.

Database Actions

This check box refers to the Bshell variable setting BDB_DEBUG=0002.

This option logs all kind of database actions such as Insert, Update, Delete, Commit, and Abort. The actions which are requested by the client, to be executed by the server (database driver), are specified by using messages.

The LN client sends commands to the server, and the server sends the results back to the client. In some cases, the server can ask the client for more information to carry out a command. In that case, the server sends an error back to the client and in some cases a list of required information. In most cases, the client sends the requested information to the server.

Messages of BDB_DEBUG=00002 can be identified by the first character:

An arrow to the right (->) means: ‘from client to server’. An arrow to the left (<-) means: ‘from the server to the client’.

These message types are possible:

  • ATT_SERVER
  • ATT_SESSION
  • DD_INFO_TABLE
  • EXE_SYSTEM
  • EXE_ROW_CNTR
  • EXE_DB_CNTR
  • EXE_SESSION
  • EXE_TBL_CNTR
  • EXE_UPDATE
  • SQL_MESSAGE
  • PERMISSION
  • SEND_COMPNR
  • DET_SESSION
  • DET_SERVER
Delayed Locks

This check box refers to the Bshell variable setting BDB_DEBUG=0004.

This option logs information on currently set locks.

References

This check box refers to the Bshell variable setting BDB_DEBUG=0010.

This option logs the references between tables.

Multi Byte Storage

This check box refers to the Bshell variable setting BDB_DEBUG=0040.

This option logs all tables using native storage format.

Permissions/Roles

This check box refers to the Bshell variable setting BDB_DEBUG=0100.

This option logs information about the database authorizations of the user. With the option BDB_DEBUG=02 the sending of the permissions is logged and with BDB_DEBUG=100 what permissions are send, is logged.

Open/Close Tables

This check box refers to the Bshell variable setting BDB_DEBUG=0200.

This option logs information on the opening and closing of cursors. As soon as a table must be accessed, a cursor must be opened.

Trace Workflow Operations

This check box refers to the Bshell variable setting DBG_DBCM: flag 01000.

Trace Staging (Data Publishing) Operations

This check box refers to the Bshell variable setting DBG_STAGING flag 02000.

BDB_DEBUG value:

This read-only field shows the resulting value of the BDB_DEBUG options.

Here is a summary of the BDB_DEBUG values that can be set:

00001 Log the drivers and parameters currently in use
00002 Log database actions such as Insert, Update, Delete, Commit and Abort
00004 Log information on currently set locks
00010 Log references between tables
00040 Log all tables using native storage format
00100 Log the permissions and roles allowed for each user
00200 Log information on opening and closing of tables

If all BDB_DEBUG options are set, the resulting value is: 00357

Internal SQL functions

This check box refers to the Bshell variable setting BAAN_SQL_TRACE=02000.

The BAAN_SQL_TRACE value 02000 logs the calls of internal SQL functions. In addition, it added a lot of information to the trace file. In case you are not explicitly interested in this information, do not use value 02000 to keep the trace file small and more readable. In case you are interested in the flow of a program, the result of this trace value will give you an indication of the executed queries and their execution flow. (Consider running the program in debug mode to get an exact overview of the flow of a program).

SQL_TRACE value

This read-only field shows the resulting value of the BAAN_SQL_TRACE Flag. If the Internal SQL functions check box is selected. the value is 02000.

Show BDB Actions

This check box refers to the Bshell option -dbgbdbact.

This option logs the LN database activities initiated from the Bshell.

For example, when inserting a record in the Price Lists (tcmcs0134m000) session, or delete some records.

Print Enums

This check box refers to the Bshell option -dbgenums.

This option dumps information about the enums used in the data dictionary when reading the DD.

Show locking errors

This check box refers to the Bshell option -dbglck.

This option does not work any more.

Show BDB server type

This check box refers to the Bshell option -dbgsrv.

This trace option logs for each table the database server type and its parameters.

Database Logging
Log Dictionary

This check box refers to this Bshell variable setting: DBSLOG=0000001.

This option logs data dictionary information of tables within the driver.

Log Row Info

This check box refers to this Bshell variable setting: DBSLOG=0000010.

This option logs row action information.

Log Table Action Info

This check box refers to this Bshell variable setting: DBSLOG=0000020.

This option logs table action information.

Log Database Action Info

This check box refers to this Bshell variable setting: DBSLOG=0000040.

This option logs transaction action information.

Log DBMS Data (Input/Output Values)

This check box refers to this Bshell variable setting: DBSLOG=0000100.

This option logs DBMS input/output data.

Log User/Group Info For Admin

This check box refers to this Bshell variable setting: DBSLOG=0000200.

This option logs administration file info (SQL drivers).

Log DBMS SQL Statements

This check box refers to this Bshell variable setting: DBSLOG=0000400.

This option logs DBMS SQL statements.

General Debug Statements

This check box refers to this Bshell variable setting: DBSLOG=0001000.

This option logs general debug statements.

Log Connections/Cursors

This check box refers to this Bshell variable setting: DBSLOG=0010000.

This option logs tracing information about connection and cursor usage.

Note: Only select this check box if Infor Development asks you to do so.
Log Transactions Longest Lock Time

This check box refers to this Bshell variable setting: DBSLOG=0200000.

This option logs successful locks and longest lock duration in a transaction

DBSLOG value:

This read-only field shows the resulting DBSLOG value of the selected database logging options.

User Start Options
Debug Options for Other Bshells
User Name

The current user.

Keep Debug Options for other Bshells

An option to save the current debug options for other Bshells of the current user. The user can still set the required settings.

If this check box is selected, the Save Settings button is enabled and a check mark is displayed before that button.

Save Settings

If you click Save Settings, the debug options set by the current user are now saved for new started Bshells of the current user. New Bshells such as parallel Bshells, services, or jobs that are started under the current user, are started with the saved debug options. Therefore, they can be traced.

After you click Save Settings, the Clear Settings button is enabled and a check mark is displayed before that button.

Clear Settings

Click Clear Settings to remove the starting debug options of the current user. Tracing stops for new started Bshells of the current user.

This button is enabled if an option file is present. After you click Clear Settings, the button is disabled.

Clear Settings also removes the profile options.

After starting the first session, while debug or profile options are still present from a previous login, you are asked whether the options must remain:

  • If you select Yes, the options and settings are removed. You must continue in a new connection.
  • If you select No, you can continue with the started session and the Bshell profile or debug settings.
Debug Options for Another User
User

To enable debug options for Bshells of another user, specify a user account.

If a user is specified, the Save Setting User button is enabled and a check mark is displayed before that button.

Note: This field is only available for super users.
Save Setting User

If you click Save Setting User, the debug options set by the current user are now saved for new started Bshells of the other user. New Bshells such as parallel Bshells, services, or jobs that are started for the other user, are started with the saved debug options. Therefore, they can be traced.

After you click Save Setting User, the Clear Setting User button is enabled and a check mark is displayed before that button.

Note: The Save Setting User command is only available for super users.
Clear Setting User

Click Clear Setting User to remove the starting debug options of the other user. Tracing stops for new started Bshells of the other user. Debug option files are deleted after one day.

This button is enabled if an option file is present.

Note: The Clear Setting User command is only available for super users.
Expires After

Specify the number of hours after which new bshell tracing is not started anymore for the other user.

When this Timestamp has expired, when starting a new bshell, the User Options in the file are ignored. The Expired User Options Files are deleted at access of the first session.

Expired On

Specify the date and time after which new bshell tracing is not started anymore for the other user.

When this Timestamp has expired, when starting a new bshell, the User Options in the file are ignored. Expired User Options Files are deleted at access of the first session.