[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Direct-Mode Commands

When you are in direct mode, in addition to M commands, a number of internal commands are available to help developers be more productive:

?

Accesses FreeM online help. Requires GNU info(1) to be installed on your local system.

events

Writes a list of event classes and their ABLOCK counts:

USER> events
 
Event Class          Processing Mode ABLOCK Count
-----------          --------------- ------------
COMM                 Disabled        0
HALT                 Disabled        0
IPC                  Disabled        0
INTERRUPT            Disabled        0
POWER                Disabled        0
TIMER                Disabled        0
USER                 Disabled        0
WAPI                 Disabled        0
TRIGGER              Disabled        0
trantab

Displays information about any uncommitted transactions currently in-flight for this process.

jobtab

Displays a summary of the FreeM job table.

locktab

Displays a list of LOCKs held in the current environment.

rbuf

Lists the status of all FreeM routine buffers.

dbstats

Shows statistics for the BerkeleyDB global handler.

wh

Forces an immediate flush of this process’s readline history buffer to disk.

shmstat

Displays the configuration of FreeM shared memory. Intended only for advanced debugging of the FreeM environment.

shmpages

Lists the status of each FreeM shared memory page. Intended only for advanced debugging of the FreeM environment.

history

Prints a list of all the direct-mode commands you have entered across all sessions.

rcl <history-index>

Allows you to recall command number <history-index> and run it again. Obtain the value for <history-index> from the output of the history command.

!!

Launches a subshell within the FreeM direct mode, allowing the user to run operating system commands.

USER> !!

Type Ctrl-D to exit from the shell
$ uname -a
Linux hesperos 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux
$ exit

USER> 
!<external-command>

Invokes a shell to run <external-command> from within FreeM. This temporarily disables SIGALRM handling in FreeM, which may interrupt the use of event-driven M programming commands including ESTART and ESTOP.

If the < character is supplied immediately preceding <external-command>, FreeM will append the contents of M local variable % to <external-command> as standard input.

If the > character is supplied immediately preceding <external-command>, FreeM will take the standard output stream of <external-command> and store it in M local variable %.

% contains the number of lines in the input or output. %(1)..%(n) contains the data for lines 1-n.

If you issue a HALT command at the direct-mode prompt, you will exit out of FreeM. However, if you issue a HALT command when $TLEVEL is greater than zero, you will be given the opportunity to commit or rollback any pending transactions:

USER> TSTART
 

TL1:USER> SET ^MYGLOBAL=1
 
 
TL1:USER> HALT
 
UNCOMMITTED TRANSACTIONS EXIST:
 
 $TLEVEL 1*
  Operations for Transaction ID: k8xj1de
  1:	action = 0  key = ^MYGLOBAL  data = 1
 
Would you like to c)ommit or r)ollback the above transactions and their operations? ($TLEVEL = 1) r


Transactions have been rolled back.

In the above example, the user selected r to rollback the single pending transaction.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on November 11, 2022 using texi2html 5.0.