PSL External Commands

%DUMP — List Specific Information

Return a list of specific information
Format
%DUMP option
Description
The %DUMP command returns a list of information that is specified
by the parameter option.
Field Definition
option One of the following:
• ALLReturn info about PATROL® Agent data structures
• APP_INSTSReturn info about each application
instance
• APPSReturn a list of applications
• CHANNELSReturn a list of open PSL global file and
process channels
• CONSOLESReturn a list of connected consoles
• ERRORSReturn a list of PSL errors that have
occurred
• GLOBALSReturn a list of global channels
• KM_LISTReturn a list of loaded KMs
• LIBRARIESReturn a list of loaded libraries
• PARAMSReturn a list of PATROL Agent parameters
• RTLISTReturn info about processes in the Agent
run-time queue
• RUNQReturn a list of items scheduled in the run
queue
• TASKSReturn a list of current tasks



%DUMP CHANNELS — List PSL Global Channels


List open PSL global process and file channels
Format
%DUMP CHANNELS
Description
The %DUMP CHANNELS command returns a list of global file and process
channels opened using either the fopen() or popen() functions. The
output from the %DUMP CHANNELS command contains the same
information as that provided by the get_chan_info() function within
a PSL program. The PSL interpreter returns the list of global channel
information to the console window from which the %DUMP CHANNELS
command was executed.
Note
The %DUMP CHANNELS command is one of a series of dump commands
available from the command line. Use the %DUMP command



%DUMP LIBRARIES — List Loaded PSL Libraries


Format
%DUMP LIBRARIES


Description
Each line of output from the %DUMP LIBRARIES command is a string
with the format:
- ,
Example
When typed into the computer window, the command
OS>%DUMP LIBRARIES outputs the following:
================ Currently Loaded Libraries =========================
response_def_lib.lib - unmodified, Wed Nov 6 15:34:42 1996
unix_misc_lib.lib - unmodified, Wed Dec 11 13:11:16 1996
set_share_lib.lib - unmodified, Tue Nov 26 16:56:38 1996
=====================================================================


%PSL — Execute a PSL Statement


Execute a one-line PSL statement
Format
%PSL statement
Parameter
Description
The %PSL command submits statement to the PSL interpreter for
immediate interpretation.


%PSLPS — List Current PSL Processes

List all scheduled or active PSL processes on the computer system
Format
%PSLPS
Description
The %PSLPS command returns a list of currently scheduled or active PSL
processes on the computer system to the console window. The
information displayed by the %PSLPS command includes the process
identifier (PID) and the name of the PSL process or command.


psl — PSL Compiler Command

Call the PSL interpreter and compiler for the specified PSL source file
Format
psl inputfile -o outfile -n -r -w -l -P -O -q -b -R -e functionname -s
librarynames -S


Parameters
Parameter Definition
inputfile Name of the PSL source file
-o outfile Write the compiled binary output as the file outfile. This
option implicitly includes the -n option; that is, the -o
option does not schedule outfile for execution after
compilation.
The PSL compiler may add a .lib or .bin extension
to outfile if you selected the -l or -b option
respectively.
-n Do not schedule outfile for execution after compilation.
-r Suppress runtime error messages. This option is
equivalent to including the statement PslDebug = 0;
in the PSL script.
-w Suppress compilation warning messages produced by
the PSL compiler.
-l Write the compiled output in library mode as the file
outfile.lib. This option implicitly includes the -n
option; that is, the -l option does not schedule
outfile.lib for execution after compilation.
-b Write the compiled output in binary mode as the file
outfile.bin.This option implicitly includes the -n option;
that is, the -b option does not execute the binary after
compilation.
-P Activate the PSL Profiler


Parameter Definition
-O Specify the optimizer level. (For more information about
optimizer levels, see “Optimization Levels” on page
C-11.)
-q Print the PSL bytecode to the screen
-R Inform the PSL compiler that statically or dynamically
loaded libraries are required for the compilation
Default if not specified: No statically or dynamically
loaded libraries required for the compilation
-e functionname Specify the user-defined function functionname within
the PSL source file as the execution entry point for the
compiled program
Default if not specified: Execution begins with the first
statement within inputfile that is not part of a
user-defined function definition.
-s Instruct the PSL compiler to statically load all user
libraries required for compilation.
Default if not specified: Load library names with the
.lib extension statically and all other library names
dynamically
librarynames List of user library names that should be statically
loaded for compilation. Library names should have the
format library_name.lib. The PSL compiler loads any
library name without the .lib extension dynamically
unless the -l flag is specified.
Default if not specified: No user libraries are included.
-S Display the PSL symbol table


Description
The psl command creates an executable binary file from inputfile and
specified librarynames. The stand-alone interpreter will immediately
execute the compiled binary if options -o outfile, -l, and -b are omitted.
Use this command to create PSL libraries and PSL binaries that can be
used in the PATROL Agent. Doing so allows for a significant
performance gain.
-O Specify the optimizer level. (For more information about
optimizer levels, see “Optimization Levels” on page
C-11.)
-q Print the PSL bytecode to the screen
-R Inform the PSL compiler that statically or dynamically
loaded libraries are required for the compilation
Default if not specified: No statically or dynamically
loaded libraries required for the compilation
-e functionname Specify the user-defined function functionname within
the PSL source file as the execution entry point for the
compiled program
Default if not specified: Execution begins with the first
statement within inputfile that is not part of a
user-defined function definition.
-s Instruct the PSL compiler to statically load all user
libraries required for compilation.
Default if not specified: Load library names with the
.lib extension statically and all other library names
dynamically
librarynames List of user library names that should be statically
loaded for compilation. Library names should have the
format library_name.lib. The PSL compiler loads any
library name without the .lib extension dynamically
unless the -l flag is specified.
Default if not specified: No user libraries are included.
-S Display the PSL symbol table
Parameter Definition
BMC Software, Inc., Confidential and Proprietary Information
5-10 PATROL Script Language Reference Manual
The following PSL features cannot be fully simulated with the PSL
interpreter:
• complex built-in functions such as create() and destroy() that
rely on the full object hierarchy of the agent
• multiple PSL process issues such as timeouts or waiting for a lock
• security issues with functions such as fopen() and cat(), which rely
on the user name operating the agent’s command