NAME
Siebel::Srvrmgr::ListParser::Output::ListTasks - subclass to parse list tasks command
SYNOPSIS
See Siebel::Srvrmgr::ListParser::Output for examples.
DESCRIPTION
This class is still a working progress, which means it is not working as expected. Please check CAVEATS for details.
This subclass of Siebel::Srvrmgr::ListParser::Output parses the output of the command list tasks
.
It is expected that the srvrmgr
program has a proper configuration for the list tasks
command. The configuration can see below:
srvrmgr> configure list tasks
SV_NAME (31): Server name
CC_ALIAS (31): Component alias
TK_TASKID (11): Internal task id
TK_PID (11): Task process id
TK_DISP_RUNSTATE (61): Task run state
CC_RUNMODE (31): Task run mode
TK_START_TIME (21): Task start time
TK_END_TIME (21): Task end time
TK_STATUS (251): Task-reported status
CG_ALIAS (31): Component group alias
TK_PARENT_TASKNUM (11): Parent task id
CC_INCARN_NO (23): Incarnation Number
TK_LABEL (76): Task Label
TK_TASKTYPE (31): Task Type
TK_PING_TIME (11): Last ping time for task
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 tasks SV_NAME (31): Server name CC_ALIAS (31): Component alias TK_TASKID (11): Internal task id TK_PID (11): Task process id TK_DISP_RUNSTATE (61): Task run state
because this class 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 tasks show SV_NAME(31), CC_ALIAS(31), TK_TASKID(11), TK_PID(11), TK_DISP_RUNSTATE(61)
Saving this configuration as a preference and loading it everytime is a good idea too.
Order of the fields is important too: everytime those fields are parsed, if they do not follow the order above an exception will be raised.
ATTRIBUTES
data_parsed
An hash reference with the data parsed from raw_data
attribute.
This hash reference is different from the base class since it expects that the key values to be array references with a list of instances of Siebel::Srvrmgr::ListParser::Output::ListTasks::Task class.
METHODS
All from parent class. Some are overrided.
CAVEATS
Unfornately, to the present moment this class is not working as expected.
Even though a Siebel::Srvrmgr::ListParser instance is capable of identifying a list tasks
command output, this class is not being able to properly parse the output from the command.
The problem is that the output is not following the expected fixed width as setup with the configure list tasks show...
command: with that, the output width is resized depending on the content of each column and thus impossible to predict how to parse it correctly. The result is messy since the output is not fixed sized neither separated by a character and the content (and width of it) cannot be predicted.
SEE ALSO
AUTHOR
Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>.
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 of Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>.
This file is part of Siebel Monitoring Tools.
Siebel Monitoring Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Siebel Monitoring Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Siebel Monitoring Tools. If not, see http://www.gnu.org/licenses/.