NAME
Siebel::Srvrmgr::ListParser::Output::Tabular::ListTasks - subclass to parse list tasks command
SYNOPSIS
See Siebel::Srvrmgr::ListParser::Output::Tabular for examples.
DESCRIPTION
This subclass of Siebel::Srvrmgr::ListParser::Output::Tabular 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 default configuration can be seen 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
If you want to use fixed width configuration from srvrmgr
this will be the expected configuration:
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
If you want to use the field delimited output from srvrmgr
then this the expected configuration:
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 (18): Parent task id
CC_INCARN_NO (23): Incarnation Number
TK_LABEL (76): Task Label
TK_TASKTYPE (31): Task Type
TK_PING_TIME (12): Last ping time for task
The 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.
METHODS
Some methods from the parent classes are overrided.
get_servers
Returns a list of the Siebel Server names from the parsed output.
count_tasks
Returns an integer representing the number of tasks recovered from the parsed output.
Expects a string as parameter being the Siebel Server name, so the number of tasks are those related to the server passed as argument.
get_tasks
Returns an iterator to iterate over the list of tasks of a Siebel Server given as argument.
At each invocation of the iterator, a instance of Siebel::Srvrmgr::ListParser::Output::ListTasks::Task is return, or undef
in the case that there are no more tasks to return.
Beware that depending on the type of output parsed, the returned instances will have more or less attributes with values.
To be compatible with the role Siebel::Srvrmgr::ListParser::Output::Duration, fixed width output data will have a default value of '2000-00-00 00:00:00' for start_datetime
attribute, which is basically useless if you that kind of information. You should use delimited data for that.
CAVEATS
Unfornately the results of list tasks
command does not works as expected if a fixed width output type is selected due a bug with the srvrmgr
itself in recent versions of Siebel (8 and beyond).
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.
That said, this class will make all the fields available from list tasks
if a field delimited output was configured within srvrmgr.
This problems does not happens when a delimited output is selected, so all fields will be available.
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/.