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

lock_info()

Get information about a PSL process lock.

Syntax

lock_info(lock_name, [separator], [separator_2])

Parameter

ParameterDefinition

lock_name

name of the lock acquired by the lock() function, or "" (empty string) to return the entire lock table

separator

single character that separates one list from another list The string returned by the lock_info() function is composed of three lists: number of read/write locks, list of waiting processes, and process Id (PID) oflock_name. The separator character delimits these lists. 

Default 
| pipe character

separator_2

character that separates one member of a list from another When a list in the return string contains more than one member, separator_2 delimits each member of the list. For example, if more than one process is waiting for the lock to be lifted, a comma (by default) separates the name of each process. 

Default 
, comma

Description

The lock_info() function gets information about a lock that was acquired by the lock() function (see lock()). If successful, this function returns a string that contains information about the lock. If unsuccessful, it returns the empty string. 

If an empty string is used in place of a lock name, a list of all locks is returned. 

The return string uses the following format: 

number_read,number_write|waiting_processes|lock_pid

 

Return ValueDescription

number_read

number of processes that are waiting for shared (reader) access under the lock This value and number_write are separated by a comma ( separator ) because they are both members of the same list.

number_write

number of processes that are waiting for exclusive (writer) access

waiting_processes

list of processes that are waiting for access Each member of this list is a PID of the waiting process followed by an r or w to indicate the type of lock. For example, 167r indicates that process 167 is waiting for a read lock and 242w indicates process 242 is waiting for a write lock.

lock_pid

PID of lock_name


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

Comments