NAME

Siebel::Srvrmgr::Daemon::Light - subclass for running commmands with srvrmgr in batch mode

SYNOPSIS

    use Siebel::Srvrmgr::Daemon::Light;

    my $daemon = Siebel::Srvrmgr::Daemon::Light->new(
        {
            time_zone   => 'America/Sao_Paulo',
            connection => $my_connection, 
			commands    => [
			        Siebel::Srvrmgr::Daemon::Command->new(
                        command => 'load preferences',
                        action  => 'LoadPreferences'
                    ),
                    Siebel::Srvrmgr::Daemon::Command->new(
                        command => 'list comp type',
                        action  => 'ListCompTypes',
                        params  => [$comp_types_file]
                    ),
                    Siebel::Srvrmgr::Daemon::Command->new(
                        command => 'list comp',
                        action  => 'ListComps',
                        params  => [$comps_file]
                    ),
                    Siebel::Srvrmgr::Daemon::Command->new(
                        command => 'list comp def',
                        action  => 'ListCompDef',
                        params  => [$comps_defs_file]
                    )
                ]
        }
    );
    $daemon->run;

DESCRIPTION

This is a subclass of Siebel::Srvrmgr::Daemon used to execute the srvrmgr program in batch mode. For a better understanding of what batch mode means, check out srvrmgr documentation.

This class is recomended for cases where it is not necessary to run several commmands through srvrmgr in a short period of time because in batch mode it will connect to the Siebel Gateway, execute the commands configured and exit, avoiding keeping a connection opened for a long time. For UNIX-like OS, this class would be a good choice for using with Inetd and Xinetd daemons.

This class is also highly recommended for OS plataforms like Microsoft Windows where IPC is not reliable enough, since this class uses system instead of IPC::Open3.

Since version 0.21, this class does not overrides anymore the parent class method shift_command. Some attention is required is this matter, since a instance of Siebel::Srvrmgr::Daemon::Light will not maintain configuration previously loaded with load preferences command. Be sure to maintain this command everytime you invoke run available in the commands attribute.

ATTRIBUTES

output_file

A string that represents the "/o" command line parameter of srvrmgr. It is defined internally, so it is read-only.

input_file

A string that represents the "/i" command line parameter of srvrmgr. It is defined internally, so it is read-only.

METHODS

get_output_file

Returns the content of the output_file attribute.

get_input_file

Returns the content of the input_file attribute.

run

This method will try to connect to a Siebel Enterprise through srvrmgr connection to submit the commands and respective actions defined during object creation.

Those operations will be executed in the sequence define until all were executed once.

Beware that Siebel::Srvrmgr::Daemon uses a single instance of a Siebel::Srvrmgr::ListParser class to process the parsing requests, so it is not possible to execute Siebel::Srvrmgr::Daemon::Command instances in parallel.

SEE ALSO

AUTHOR

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

COPYRIGHT AND LICENSE

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/.