Important This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 22.1 for BMC Helix Operations Management.

PSL Built-in Functions


This chapter describes the PSL built-in functions. The functions are listed in alphabetical order. The following table lists the PSL built-in functions described in this manual, indexed by category. To review conditions that may result when executing a function from the command line, see Executing Functions from the Command Line.

 PSL Built-in Functions

Function

Definition

Application Discovery:

verify whether the PSL script is in a full discovery cycle 

allow time for an object to change states 

verify the existence of a process on the system 

return a list of processes in the PATROL Agent process cache

Command Execution:

verify that a process or file I/O channel exists

close a channel created by the popen() function 

execute a PATROL link command within the console

submit command to a command processor

open a channel to a file

return channel information

execute command within the PATROL Agent 

open a channel to a process

convert a local channel to a shared global channel 

submit a command to the operating system

Date and Time:

return the time/date as a character string 

convert the Gregorian date and time to system time 

return the current date and time

return the current system time

Debugging:

suspend process and wait for "attach" from the PSL Debugger

enable tracing for a specified process, application, or parameter

Environment:

return the value of an object environment variable

Event Management:

write text to the diary of a PATROL event 

write selected PATROL events to an archive file

return information from a PATROL event catalog

count specific PATROL Event Manager events

return specific PATROL Event Manager events

change the state of a range of event IDs

return the events with a specified range of event IDs

return statistics for events matching the specified filter

schedule a PATROL event

create an event instance

create an event instance with a specified origin

File Handling:

return the contents of a file as a single string

test for existence and return the last modification time of a file

open channel to a file

set file position

return current file position 

remove a file from the file system

return a unique temporary file name character string

Input/Output:

load, destroy, or print a chart on the PATROL Console

send an information event to the PATROL Event Manager

pop up a task window on interested consoles

return string to a PATROL console computer system window

display output using C language formatting conventions

return data read from an open channel

return a line of data read from an open channel

write data to an open channel

write arbitrary text to a pop-up task window

International:

convert a string from one codeset to another 

change the format of a date string

return the length of a string in number of characters

return the length of a string in bytes

set or get the value of a locale category

International (ID-Based Messaging):

validate a message ID and message catalog

return the format information for a message

return a code that explains the severity of a message

display message in the computer or task output window

return message text to specified destination

International (String-Based Messaging):

return message text by defining domain and category

return message text by defining domain

return message text 

set or get the current name of the domain

Locking:

send a condition variable to unblock a process

block a process while waiting for a condition variable

destroy a PSL process lock and wake blocked processes

request a PSL process lock

get information about a PSL process lock

release a PSL process lock

Mathematical:

return the arccosine trigonometric function

return the arcsine trigonometric function

return the arctangent trigonometric function

return the smallest integer not less than the argument

convert a number from one base to another

return the cosine trigonometric function

return the hyperbolic cosine function

return the natural base e raised to a power

return the absolute value of a floating point number

return the largest integer not greater than the argument

return the remainder of a floating point division

return the integer portion of a number

return the logarithm with respect to base e

return the logarithm with respect to base 10

return the value of a number raised to a power

return a pseudorandom number 

return the sine trigonometric function

return the hyperbolic sine function

return the square root 

seed the pseudorandom number generator

return the tangent trigonometric function 

return the hyperbolic tangent function

Object Manipulation:

similar to set() except many variables are set at one time

hide PATROL object state changes for a period of time

change the state of an object

add a new application instance

delete an existing application instance

verify whether the object exists

return the current value of a variable

list the variables associated with an object

return whether an object is a variable

specify the value of a variable

remove an object assigned using the set() function

Parameters and Parameter History:

provide contextual information for a PATROL parameter 

return the annotation for a PATROL parameter value

dump the history for applications, instances, and parameters

return the Border, Alarm1, and Alarm2 range settings

return event history information for an object parameter 

return the history retention value for a PATROL object 

refresh PATROL parameters

set the range for the alarm conditions for a parameter

PATROL Agent:

manage PATROL Agent configuration variables

PATROL Console:

return 1 if the console is a PATROL Developer Console

return the number of consoles accessing this script

PATROL Console User Input:

display a dialog box to the PATROL console

return element status from a dynamicresponse() function

Process Control:

call user-defined PSL function upon termination of a process

return the process identifier for the current PSL process

return a PSL process name as per a specified process ID

terminate a PSL process

start a PSL process

call a PSL built-in function indirectly after testing syntax

test for the existence of a PSL built-in function

set the run-time options for the calling PSL process

suspend PSL process for a specified number of seconds

enable tracing for a specified process, application, or parameter

Remote PATROL Agent:

test the validity of a session with a remote PATROL Agent

close a session with a remote PATROL Agent

return a list of events from a remote Event Manager

create an event instance for a remote Event Manager 

send a file to a remote PATROL Agent

open a session with a remote PATROL Agent

Security:

determine whether a user name has a permission

get value from the secure area of a PATROL Agent

store and encrypt a text string in the PATROL Agent

Set:

return a list where the elements are in one list but not others

return a list where the elements are common to all specified lists

sort a list of characters or numbers

verify that one list is a subset of another

return a list that is the union of individual lists

remove all duplicate elements from a list

SNMP:

verify PATROL Agent SNMP support

start the PATROL Agent SNMP support 

stop the PATROL Agent SNMP support 

close a PATROL Agent SNMP session

configure or return parameters from a PATROL SNMP session

activate debugging for SNMP 

return variables from the Management Information Base (MIB) 

return alphabetically greater MIB variables

open brief session to return MIB variables 

open brief session to return alphabetically greater MIB variables

open brief session to set variables in the MIB 

open session with the SNMP agent 

set variables in the MIB 

stop accumulating incoming SNMP event traps

start accumulating incoming SNMP event traps

raise the standard PATROL trap

receive and return SNMP event traps

maintain a list of SNMP Managers that receive traps

send an SNMP trap

return subsequent variables from the MIB

String Manipulation:

convert string from ASCII encoding to EBCDIC encoding

convert string from EBCDIC encoding to ASCII encoding

encrypt a supplied string as per a specified encryption type

list all lines that contain a specified pattern

return the character offset of one string within another

determine whether the string is numeric

join strings together with a separator between each string

return the length of a text string or block

return the number of lines in a text string or block

save the results of a regular-expression to variables

return specified fields from a text string

return specified fields from a text string (counting blank) 

return specified lines from a text string 

return specified lines from a text string (counting blank)

return the next lines from a variable and remove them

replace specified string in text with a replacement string

return the last position of one string within another

parse text into user-defined variables

return format string to the specified destination

perform a case-insensitive string comparison

compose a string by repeating another string

return a specified portion of a string

return the last lines from a text string or block

return a string with all characters converted to lowercase

return a string with all characters converted to uppercase

return a string with specified characters removed

Variable Argument List:

return the next value from a variable argument list 

reset a variable argument list to return the first value

 

 

 

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