# # Copyright (c) 2012 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary EventShowStatistics ComponentState Module ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::EventShowStatistics =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP EventLog. A related class is L, which represents access to an ONTAP EventShowStatitics. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the EventShowStatistics element are the attributes of the EventShowStatistics ComponentState. =over =item C<< "node" >> Filled in for CMode CLI. =item C<< "receive_selects" >> Filled in for CMode CLI. =item C<< "receive_select_failures" >> Filled in for CMode CLI. =item C<< "new_user_select_on" >> Filled in for CMode CLI. =item C<< "read_client_select_on" >> Filled in for CMode CLI. =item C<< "read_event_select_on" >> Filled in for CMode CLI. =item C<< "read_event_messages" >> Filled in for CMode CLI. =item C<< "read_event_push_events" >> Filled in for CMode CLI. =item C<< "read_client_messages" >> Filled in for CMode CLI. =item C<< "read_client_push_events" >> Filled in for CMode CLI. =item C<< "router_get" >> Filled in for CMode CLI. =item C<< "router_console" >> Filled in for CMode CLI. =item C<< "router_mlogd" >> Filled in for CMode CLI. =item C<< "router_hdash" >> Filled in for CMode CLI. =item C<< "router_no_external_conf" >> Filled in for CMode CLI. =item C<< "router_no_external_dest" >> Filled in for CMode CLI. =item C<< "router_external_too_soon" >> Filled in for CMode CLI. =item C<< "router_pastthresh" >> Filled in for CMode CLI. =item C<< "router_do_asup" >> Filled in for CMode CLI. =item C<< "router_do_snmp" >> Filled in for CMode CLI. =item C<< "router_do_email" >> Filled in for CMode CLI. =item C<< "router_do_syslog" >> Filled in for CMode CLI. =item C<< "router_do_none" >> Filled in for CMode CLI. =item C<< "drop_no_info" >> Filled in for CMode CLI. =item C<< "indication" >> Filled in for CMode CLI. =item C<< "cdev_read" >> Filled in for CMode CLI. =item C<< "nvram_insert" >> Filled in for CMode CLI. =item C<< "cdev_insert" >> Filled in for CMode CLI. =item C<< "timer_sup" >> Filled in for CMode CLI. =item C<< "pre_init_drop" >> Filled in for CMode CLI. =item C<< "nparams_drop" >> Filled in for CMode CLI. =item C<< "empty_event_pool_drop" >> Filled in for CMode CLI. =item C<< "unknown_type_drop" >> Filled in for CMode CLI. =item C<< "nvram_insert_fail" >> Filled in for CMode CLI. =item C<< "encode_drop" >> Filled in for CMode CLI. =item C<< "read_drop" >> Filled in for CMode CLI. =item C<< "param_parse_drop" >> Filled in for CMode CLI. =item C<< "total_drop" >> Filled in for CMode CLI. =item C<< nvram_peak_usage >> *Peak Percentage of NVRAM Buffer Used Filled in for CMode CLI. =item C<< nvram_current_usage >> *Current Percentage of NVRAM Buffer Used Filled in for CMode CLI. =item C<< ram_peak_usage_time >> *Time of Peak RAM buffer Usage Filled in for CMode CLI. =item C<< nvram_peak_usage_time >> *Time of Peak NVRAM buffer Usage Filled in for CMode CLI. =item C<< ram_current_usage >> *Current Percentage of RAM Buffer Used Filled in for CMode CLI. =item C<< ram_peak_usage >> *Peak Percentage of RAM Buffer Used Filled in for CMode CLI. =item C<< num_drops_logger_stream_error >> Number of Events Dropped Due to the Logger File Stream Error Filled in for CMode CLI. =item C<< router_logger >> Number of Events Sent to the Logger Filled in for CMode CLI. =item C<< num_drops_logger_queue_full >> Number of Events Dropped Due to the Logger Queue being Full Filled in for CMode CLI. =item C<< logger_write_time_max >> Longest Time Taken to Write Event to Log File (msec) Filled in for CMode CLI. =item C<< logger_queue_high_mark >> Peak Number of Events in the Logger Queue Filled in for CMode CLI. =item C<< logger_write_time_mean >> Mean Time Taken to Write Event to Log File (usec) Filled in for CMode CLI. =back =cut package NACL::CS::EventShowStatistics; use strict; use warnings; use Params::Validate qw(validate); use NACL::ComponentUtils qw(_dump_one); use NATE::Log qw(log_global); my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); use Data::Dumper; use NACL::Exceptions::NoElementsFound qw(:try); use NATE::BaseException qw(:try); use base 'NACL::CS::ComponentState::ONTAP'; use Class::MethodMaker [ scalar => 'node', scalar => 'receive_selects', scalar => 'receive_select_failures', scalar => 'new_user_select_on', scalar => 'read_client_select_on', scalar => 'read_event_select_on', scalar => 'read_event_messages', scalar => 'read_event_push_events', scalar => 'read_client_messages', scalar => 'read_client_push_events', scalar => 'router_get', scalar => 'router_console', scalar => 'router_mlogd', scalar => 'router_hdash', scalar => 'router_no_external_conf', scalar => 'router_no_external_dest', scalar => 'router_external_too_soon', scalar => 'router_pastthresh', scalar => 'router_do_asup', scalar => 'router_do_snmp', scalar => 'router_do_email', scalar => 'router_do_syslog', scalar => 'router_do_none', scalar => 'drop_no_info', scalar => 'indication', scalar => 'cdev_read', scalar => 'nvram_insert', scalar => 'cdev_insert', scalar => 'timer_sup', scalar => 'pre_init_drop', scalar => 'nparams_drop', scalar => 'empty_event_pool_drop', scalar => 'unknown_type_drop', scalar => 'nvram_insert_fail', scalar => 'encode_drop', scalar => 'read_drop', scalar => 'param_parse_drop', scalar => 'total_drop', scalar => 'nvram_peak_usage', scalar => 'nvram_current_usage', scalar => 'ram_peak_usage_time', scalar => 'nvram_peak_usage_time', scalar => 'ram_current_usage', scalar => 'ram_peak_usage', scalar => 'num_drops_logger_stream_error', scalar => 'router_logger', scalar => 'num_drops_logger_queue_full', scalar => 'logger_write_time_max', scalar => 'logger_queue_high_mark', scalar => 'logger_write_time_mean', ]; =head1 METHODS =head2 fetch my $EventLog_state = NACL::CS::EventShowStatistics->fetch(command_interface => $ci, ...); my @EventLog_states = NACL::CS::EventShowStatistics->fetch(command_interface => $ci, ...); (Class method) Discovers which elements are present and returns their state in ComponentState objects. Called in scalar context it returns only one state object, in list context it returns all state objects. See L for a more detailed description along with a complete explanation of the options it accepts. Supports CMode CLI. =over =item Exceptions =over =item C When there are no elements matching the query specified or elements of that type doesn't exist, then this exception will be thrown. =back =back =cut sub fetch { $Log->enter() if $may_enter; my $pkg = shift; my @state_objs = $pkg->SUPER::fetch( @_, show_cmd => 'event show-statistics', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode', }, ], exception_text => 'No matching event show statistics(s) found' ); $Log->exit() if $may_exit; return wantarray ? @state_objs : $state_objs[0]; } ## end sub fetch sub _fetch_cmode_cli { $Log->enter() if $may_enter; my $pkg = shift; my @state_objs = $pkg->SUPER::_fetch_cmode_cli(@_, api => 'event_show_statistics'); $Log->exit() if $may_exit; return @state_objs; } ## end sub _fetch_cmode_cli 1;