Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

mgetrec


Use the mgetrec command to obtain the value of a global record. Global records are persistent, structured, global variables. The scope of these variables is the entire Knowledge Base; any other variable has a scope limited to the current rule. For more information, see the BMC Knowledge Base Development Reference Guide.

mgetrec syntax

The following figure shows the syntax for mgetrec.

mgetrec syntax

mgetrec [-c <ConfigFile>] [-i UserID[/Password][@Host[/Port]]]
[-h|?] {-p <Var Value>} [-n <cellName> | -n @Host[/Port[#Key]]]
-r <Record>[.<Slot>] [-q] [-z]

The -n option is required if the cell is remote and defined in the installationDirectory/pw/server /etc/mcell.dir file, or if the cell is local and named something other than Host.

The following table lists the command-specific option for mgetrec. For a list of common command options that apply to all CLI commands, see Event-management-common-command-options.

mgetrec option

Option

Description

-r Record [.Slot]

Specifies the global record to be obtained, optionally limited to one of its slots

mgetrec example

The following figure shows an example of mgetrec.

Example of mgetrec

mgetrec -r EM_KB_OPTIONS

The preceding command produces output similar to the example shown in the following figure:

Output of mgetrec

startup_script_enabled
-----
NO
-----
dfilter_enabled
-----
NO
-----
dnotification_enabled
-----
NO
-----
dpropagation_enabled
-----
NO
-----
default_location
-----

mgetrec return codes

There are no command-specific return codes for mgetrec. For a list of common return codes that apply to all CLI commands, see Event-management-return-codes.

 

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