psl--PSL Compiler Command


Calls the PSL interpreter and compiler for the specified PSL source file.

Format

psl
psl inputfile [-o outfile -n -r -w -l -P -O -q -b -R
-h -v -e functionname -s librarynames -S -L librarypaths]

Parameters

Parameter

Definition

 None  

 no parameters
  Entering this command without parameters starts an interactive mode of the PSL compiler. It executes everything that you type at a prompt that precedes the end of file (EOF) character, which is Ctrl+d or Ctrl+c on most platforms.  

 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 -ooption does not schedule outfile for execution after compilation.
  The PSL compiler may add a .libor .bin extension to outfile if you selected the -lor -b option respectively.  

 -n  

 do not schedule outfile for execution after compilation  

 -r  

suppress run-time 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 -loption does not schedule outfile.libfor execution after compilation. 

-P

activate the PSL Profiler 

-b

write the compiled output in binary mode as the file outfile.bin This option implicitly includes the -n option; that is, the -boption does not execute the binary after compilation. 

-O

specify the optimizer level For more information about optimizer levels, Optimization Levels

-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

No statically or dynamically loaded libraries are required for the compilation. 

-h

display command line help information 

-v

display version number information 

-e functionname

specify the user-defined function function name within the PSL source file as the execution entry point for the compiled program.

Default

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 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.

-S

display the PSL symbol table

-L

override the default library search path

librarypaths

directory paths to search for libraries included in PSL by a requires statement. For Windows systems, the paths should be separated by colons. On Unix system, the paths should be separated by semi-colons.

 

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 . Doing so allows for a significant performance gain.

The following types of PSL functions are not supported by the standalone PSL interpreter:

  • functions that rely on the object hierarchy of the PATROL Agent such as create(), destroy(), history(), get_ranges(), and other functions
  • functions that rely on multiple PSL processes such as the lock() function
  • SNMP functions
  • event management functions
  • response() functions

Other PSL functions that do not rely on the PATROL Agent such as file manipulation, string manipulation, and print functions will work. 

Where to go from here

PSL-External-Commands

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*