psl--PSL Compiler Command

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


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


 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  
-lwrite 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. 
-Pactivate the PSL Profiler 
-bwrite 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. 
-Ospecify the optimizer level For more information about optimizer levels, Optimization Levels
-qprint the PSL bytecode to the screen 

inform the PSL compiler that statically or dynamically loaded libraries are required for the compilation


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

-hdisplay command line help information 
-vdisplay 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.


Execution begins with the first statement within inputfile that is not part of a user-defined function definition. 

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

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.

-Sdisplay the PSL symbol table
-Loverride the default library search path

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.


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

Was this page helpful? Yes No Submitting... Thank you