Siebel::Srvrmgr::ListParser::Output::Duration - Moose role to deal with start and end time of objects
with 'Siebel::Srvrmgr::ListParser::Output::Duration';
This Moose role enables a class to deal with start and end time of it's instances, including calculating the duration of the object life inside the Siebel Server.
A string representing the date and time the object was created.
The string will have the following format:
YYYY-MM-DD hh:mm:ss
This is a required attribute duration object creation and it's read-only.
A DateTime instance created during the object creation that is using this role.
In the absence of a value for end_time attribute, this object will be used to calcule the value returned by duration method.
end_time
duration
This is a read-only attribute.
Same thing as start_time, but representing when the object had finish anything that was doing in the Siebel server.
start_time
It is not a required attribute during creation and it is read-only. The default value for it is an empty string.
The time_zone to be considered for the time stamps parsed, for having proper date and time as configured in the Siebel Enterprise OS level.
This parameter has a default value fetched from the environment variable c<SIEBEL_TZ>, so this variable must previously set before to avoid errors. See Siebel::Srvrmgr::Daemon for that.
Returns the time_zone attribute value.
time_zone
Returns start_datetime attribute value.
start_datetime
Returns curr_datetime attribute value.
curr_datetime
Returns end_datetime attribute value.
end_datetime
This method will check the value of end_time attribute for inconsistences and set a sane value to it.
Any class using this role must execute this method inside it's BUILD method. If there isn't one, you will need to a create one to do that.
This method checks if the object is still (supposely) running by the time it's data was recovered from srvrmgr.
srvrmgr
If returns true (1) or false (0);
Expects as parameter a string in the format of start_datetime attribute.
Returns a DateTime object representation of this string using the available timezone and locale information.
Calculates how much time the object spent doing whatever it was doing, or, if it is not finished, how much time already spent doing that (using curr_datetime attribute for that).
The return value is in seconds.
Moose::Manual::Roles
DateTime
Siebel::Srvrmgr::Daemon
Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>.
This software is copyright (c) 2012 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/.
To install Siebel::Srvrmgr, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Siebel::Srvrmgr
CPAN shell
perl -MCPAN -e shell install Siebel::Srvrmgr
For more information on module installation, please visit the detailed CPAN module installation guide.