The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Siebel::Srvrmgr::Log::Enterprise::Parser::Comp_alias - parses of component alias from the Siebel Enterprise log file

SYNOPSIS

    # see the proc_mon.pl script in the examples directory

DESCRIPTION

This class implements the Siebel::Srvrmgr::Comps_source Moose Role to recover information from components by reading the Siebel Enterprise log file.

This enables one to create a "cheap" (in the sense of not needing to connect to the Siebel Server) component monitor to recover information about CPU, memory, etc, usage by the Siebel components.

ATTRIBUTES

process_regex

Required attribute.

A string of the regular expression to match the components PID logged in the Siebel Enterprise log file. The regex should match the text in the sixth "column" (considering that they are delimited by a character) of a Siebel Enterprise log. Since the Siebel Enterprise may contain different language settings, this parameter is required and will depend on the language set.

An example of configuration will help understand. Take your time to review the piece of Enterprise log file below:

    ServerLog   ComponentUpdate 2       0000149754f82575:0      2015-03-05 13:15:41     AdminNotify     STARTING        Component is starting up.
    ServerLog   ComponentUpdate 2       0000149754f82575:0      2015-03-05 13:15:41     AdminNotify     INITIALIZED     Component has initialized (no spawned procs).
    ServerLog   ComponentUpdate 2       0000149754f82575:0      2015-03-05 13:15:41     SvrTaskPersist  STARTING        Component is starting up.
    ServerLog   ProcessCreate   1       0000149754f82575:0      2015-03-05 13:15:41     Created multithreaded server process (OS pid =  9644    ) for SRProc
    ServerLog   ProcessCreate   1       0000149754f82575:0      2015-03-05 13:15:41     Created multithreaded server process (OS pid =  9645    ) for FSMSrvr
    ServerLog   ProcessCreate   1       0000149754f82575:0      2015-03-05 13:15:41     Created multithreaded server process (OS pid =  9651    ) for AdminNotify

In this case, the string should be a regular expression something like Created\s(multithreaded)?\sserver\sprocess.

This attribute is a string, not a compiled regular expression with qr.

archive

An optional object instance of a class that uses the Moose::Role Siebel::Srvrmgr::Log::Enterprise::Archive.

An important concept (and the reason for this paragraph) is that the reading of the Siebel Enterprise log file might be restricted or not.

In restricted mode, the Siebel Enterprise log file is read once and the already read component aliases is persisted somehow, including the last line of the file read: that will avoid reading all over the file again, and more important, minimizing association of reused PIDs with component aliases, thus generating incorrect data.

To use "simple" mode, nothing else is necessary. Simple is much simpler to be used, but there is the risk of PIDs reutilization causing invalid data to be generated. For long running monitoring, I suggest using restricted mode.

log_path

A string of the complete pathname to the Siebel Enterprise log file.

METHODS

get_process_regex

Getter for the attribute process_regex.

find_comps

Parses the Siebel Enterprise log file by using a instance of a class that implements Siebel::Srvrmgr::Log::Enterprise::Archive Moose Role.

Expects as parameter a hash reference containing as keys the PIDs and as values the respective instances of Siebel::Srvrmgr::OS::Process.

It will return the same reference with the component alias information include when possible.

SEE ALSO

AUTHOR

Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 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/>.