bshcmd
You can use this command to change the log facilities of the Logic Server (bshell) or kill one or more bshell processes. You perform the actions with this command while the bshell is running.
Synopsis
bshcmd [options] <bshell_pid>
Possible options
-
–v
: Print version information. -
–p
: Show process list. -
–m
: Show memory usage. -
–d <dbglvl>
: Set DEBUG_LEVEL to (octal) <dbglvl>.These
<dbglvl>
values are available:- 0000000001: Show data input actions.
- 0000000002: Show object information.
- 0000000004: Show reference paths.
- 0000000020: Debug functions.
- 0000000040: Database server information.
- 0000000100: Show delayed locks.
- 0000000200: Show process actions, such as sleep, kill, and so on.
- 0000000400: Database reference information.
- 0000001000: Show database actions.
- 0000002000: Debug file access.
- 0000004000: Show loaded resources.
- 0000010000: Show loading of enums.
- 0000020000: Show Bshell CPU instructions.
- 0000100000: Show whether domains, data definitions and objects are loaded from disk or shared memory.
- 0000200000: Debug
get.var
&put.var
functions. - 0000400000: Debug scheduler.
- 0001000000: Debug pseudo terminals.
- 0002000000: Show opened sequential files.
- 0004000000: Debug TSS functions.
- 00020000000: Debut ORB integration.
- 00040000000: Show stack traces.
- 00100000000: Debug messages.
- 00200000000: Show program flow.
-
–k <pid>
: Kill bshell process ID pid. -
–e
: Kill all bshell processes. -
–M "message"
: Send message to bshell. -
–W
sec: Wait until the previously issued command is executed. After this, the previous command is overwritten. -
–w sec
: Wait sec seconds for bshell to execute command. -
–u sec
: Send SIGUSR1 to bshell (wakeup). This option must only be used in combination with the–w
option. Waits sec seconds to see if you run the command. -
–s
: Show entire contents of log file, if accessible. You must only use this option in combination with the–p
and–w
options. -
-L
: Print log file name of bshell. You must only use this option in combination with the–p
and–w
options. -
-T "cmdstr"
: Modify BDB_DEBUG or BAAN_SQL_TRACE (bshell) and DBSLOG, {DBMS}PROF or {DBMS}STAT (drivers) tracing variables. cmdstr can contain multiple commands of the form:-
trace variable=<value>
: Set variable to value. -
trace variable+<value>
: Add bits to variable. -
trace variable-<value>
: Remove bits from variable.
For older versions such as Baan IV you can still use
-T "cmdstr"
with the TT_SQL_TRACE option. -
-
-C
: Send command to combo db driver attached to bshell. -
-S
: Send command to all db driver attached to the bshell.
Notes
- All output is stored in the bshell's log file, which by default is: $BSE_TMP/bshell.pid
- Only one command can be active at a time. New commands overwrite previous ones.
- Check the return value to see if a command was processed.
- The
bshell_pid
process number is a member of the output of the UNIXps
command.
Examples
bshcmd –s –p –w 10 <bshell_pid>
Show the process list, and wait 10 seconds for a response. If no actions are carried out within 10 seconds, no output is given.
bshcmd –d 02000 <bshell_pid>
Set DEBUG_LEVEL to 02000.
bshcmd –M "Hello" –u 10 –w 10 <bshell_pid>
Send a message to a specific bshell.
bshcmd –k <pid> <bshell_pid>
Kill the bshell process <pid>. The <pid> process number can be accessed from the shell program (ttstpshell) with the ps command.
bshcmd –T “TT_SQL_TRACE+02000” <bshell_pid>
Set TT_SQL_TRACE to log interface calls.