DB2-Admin
view release on metacpan or search on metacpan
lib/DB2/Admin.pm view on Meta::CPAN
=item Sort
=item Timestamp
=back
=head2 SetMonitorSwitches
This method sets the monitor switches in effect for the current
application. This will affect the data returned by a C<GetSnapshot>
call.
This method takes one required and two optional named parameters:
=over 4
=item Switches
A reference to a hash with the switches that should be enabled or
disabled. Any switch option not named will be kept at the current
value. See the C<GetMonitorSwitches> method for a list of switch
names supported.
=item Version
=item Node
=back
The return value for this method is the list of switches that was in
effect before the C<SetMonitorSwitches> call, in the same format as
returned by the C<GetMonitorSwitches> method.
=head2 ResetMonitor
This method will reset the monitor data (e.g. counters) in effect for
the current application. It can do so globally (for all active
databases) or for a particular database.
This method takes three optional named parameters:
=over 4
=item Alias
The name of a database or alias to reset the monitor data for. In the
absence of this parameter, monitor data will be reset for all active
databases.
=item Version
=item Node
=back
=head2 GetSnapshot
This method performs a database snapshot and returns the collected
snapshot data. It can collect data in one or more monitoring areas,
then returns a hash reference with decoded snapshot results.
This method takes the following named parameters, of which only
C<Subject> is required:
=over 4
=item Subject
The area to be monitored. This can be either a single value, or a
reference to an array of values. Each value can be a string with an
object type, like C<SQLMA_APPLINFO_ALL>, or a reference to an hash
that contains a type, optional agent id, and optional object name.
For example, to get lock snapshot data for databases 'FOO' and
'BAR', call this method with the following C<Subject> parameter:
'Subject' => [ { 'Type' => 'SQLMA_DBASE_LOCKS' }, 'Object' => 'FOO' },
{ 'Type' => 'SQLMA_DBASE_LOCKS' }, 'Object' => 'BAR' },
];
To get lock snapshot data for a particular agent id, call this method
with the following C<Subject> parameter:
'Subject' => { 'Type' => 'SQLMA_APPL_LOCKS_AGENT_ID' },
'AgentId' => 12345,
},
In all cases, the C<Type> is required, and C<Object> and C<AgentId>
are optional and mutually exclusive.
=item Version
=item Node
=item Class
The snapshot class. This is a string that can be
C<SQLM_CLASS_DEFAULT> (a normal snapshot, which is the default),
C<SQLM_CLASS_HEALTH>, or C<SQLM_CLASS_HEALTH_WITH_DETAIL>.
Health snapshots are only available with DB2 release 8 or higher, and
if the health monitor is active.
=item Store
This boolean parameter indicates whether the snapshot results are to
be stored at the DB2 server for viewing using SQL table functions.
This is false by default.
=back
The return value from this method is a reference to a hash with data
in the C<DB2::Admin::DataStream> format. When developing new applications,
users are recommended to use the C<Data::Dumper> module to study the
output format.
When called in array context, this function returns both the parsed
data in C<DB2::Admin::DataStream> format and the original binary data. This
can be used to save the binary data for debugging or later analysis.
( run in 0.562 second using v1.01-cache-2.11-cpan-39bf76dae61 )