NAME
Siebel::Srvrmgr::ListParser::Output::Listcomp - subclass that parses list comp
commands output of srvrmgr.
SYNOPSIS
See Siebel::Srvrmgr::ListParser::Output.
DESCRIPTION
This class extends Siebel::Srvrmgr::ListParser::Output base class adding support for parsing list comp
commands.
The module is capable of identifying output of several servers configured in the enterprise and organizes the components found for each server.
It is expected that the srvrmgr
program has a proper configuration for the list comp
command. The configuration can see below:
srvrmgr> configure list comp
SV_NAME (31): Server name
CC_ALIAS (31): Component alias
CC_NAME (76): Component name
CT_ALIAS (31): Component type alias
CG_ALIAS (31): Component GRoup Alias
CC_RUNMODE (31): Component run mode (enum)
CP_DISP_RUN_STATE (61): Component display run state
CP_NUM_RUN_TASKS (11): Current number of running tasks
CP_MAX_TASKS (11): Maximum tasks configured
CP_ACTV_MTS_PROCS (11): Active MTS control processes
CP_MAX_MTS_PROCS (11): Maximum MTS control processes
CP_START_TIME (21): Component start time
CP_END_TIME (21): Component end time
CP_STATUS (251): Component-reported status
CC_INCARN_NO (23): Incarnation Number
CC_DESC_TEXT (251): Component description
This output above should be the default but it will be necessary to have the configuration below (check the difference of size for each column):
srvrmgr> configure list comp
SV_NAME (31): Server name
CC_ALIAS (21): Component alias
CC_NAME (76): Component name
CT_ALIAS (31): Component type alias
CG_ALIAS (31): Component GRoup Alias
CC_RUNMODE (31): Component run mode (enum)
CP_DISP_RUN_STATE (61): Component display run state
CP_NUM_RUN_TASKS (16): Current number of running tasks
CP_MAX_TASKS (12): Maximum tasks configured
CP_ACTV_MTS_PROCS (17): Active MTS control processes
CP_MAX_MTS_PROCS (16): Maximum MTS control processes
CP_START_TIME (21): Component start time
CP_END_TIME (21): Component end time
CP_STATUS (251): Component-reported status
CC_INCARN_NO (23): Incarnation Number
CC_DESC_TEXT (251): Component description
because Siebel::Srvrmgr::ListParser::Output::ListComp::Comp will expect to have all columns names without being truncated. This class will check those columns names and order and it will raise an exception if it found something different from the expected.
To enable that, execute the following commands in the srvrmgr
program:
set ColumnWidth true
configure list comp show SV_NAME(31), CC_ALIAS(21), CC_NAME(31), CG_ALIAS(31), CC_RUNMODE(31), CP_DISP_RUN_STATE(61),\
CP_NUM_RUN_TASKS(16), CP_MAX_TASKS(11), CP_ACTV_MTS_PROCS(17), CP_MAX_MTS_PROCS(16), CP_START_TIME(21), \
CP_END_TIME(21), CP_STATUS(251), CC_INCARN_NO(23), CC_DESC_TEXT(251)
Saving this configuration as a preference and loading it everytime is a good idea too.
ATTRIBUTES
last_server
A string that represents the last associated server from the list of components read from output.
By default, the value of it is an empty string.
This attribute is used during parsing of list comp
command and is a read-only attribute.
comp_attribs
An array reference with the components attributes. This is a read-only attribute.
servers
This is an array reference with the servers found during processing of the list components
output.
METHODS
get_fields_pattern
Returns the field_pattern attribute as a string.
get_comp_attribs
Returns the value of comp_attribs attribute as an array reference.
get_last_server
Returns the last_server attribute as a string.
get_servers
Returns the value of servers attribute as an array reference.
get_server
Expects as parameter the name of a server which output was parsed.
If the server exists in the servers
attribute, it returns a Siebel::Srvrmgr::ListParser::Output::ListComp::Server object. Otherwise it will return undef
.
parse
Parsers the data available in the raw_data
attribute, populating the data_parsed
attribute.
The raw_data
attribute will be set to an empty array reference once the parsing is finished.