Reply

POE from NetMRI

Guru
Posts: 23
12539     0

Hi, 

Was trying to see if the NetMRI produces PoE Stats - namely Power.

So for a Cisco switch I type, "power inline"

 

The result is (truncated)...

 

Gi1/0/1 auto on 17.1 Ieee PD 4 30.0
Gi1/0/2 auto off 0.0 n/a n/a 30.0
Gi1/0/3 auto off 0.0 n/a n/a 30.0
Gi1/0/4 auto off 0.0 n/a n/a 30.0
Gi1/0/5 auto off 0.0 n/a n/a 30.0
Gi1/0/6 auto on 7.0 Ieee PD 2 30.0
Gi1/0/7 auto on 7.0 Ieee PD 2 30.0
Gi1/0/8 auto off 0.0 n/a n/a 30.0
Gi1/0/9 auto on 7.0 Ieee PD 2 30.0
Gi1/0/10 auto on 7.0 Ieee PD 2 30.0
Gi1/0/11 auto off 0.0 n/a n/a 30.0
Gi1/0/12 auto on 7.0 Ieee PD 2 30.0
Gi1/0/13 auto off 0.0 n/a n/a 30.0

 

In the Interface Gi1/0/1, NetMRI produces the result through the API as follows;

 

my $IFbroker = $netmriObj->broker->interface;
my @DevicesIFArray = $IFbroker->index({DeviceID => $DevID});

foreach my $IFLine(@DevicesIFArray){

print("DumplerIFRef:" . Dumper($IFLine));

}

 

DumplerIFRef:$VAR1 = bless( {
'ifSwitchPortMgmtInd' => 1,
'ifTunnelInd' => 0,
'ifOperStatusChange' => '2019-01-22 00:30:07',
'ifArtificialInd' => 0,
'ifConnector' => 'true',
'ifVirtualInd' => 0,
'ifMtu' => 1500,
'PoEStatus' => 'deliveringPower',
'ifAggrMemberInd' => 0,
'ifDescrRaw' => 'GigabitEthernet1/0/1',

'PoEPower' => 7301,
'ifTimestamp' => '2019-02-23 21:41:07',
'ifStartTime' => '2019-02-12 14:25:23',
'ifName' => 'Gi1/0/1',
'ifEncapsulationType' => 'dot1Q',
'ifLinkAggrIndex' => undef,
'AggrInterfaceID' => undef,
'ifDescr' => 'WLAN AP LHR2045T2A1-A2-AP00628 - Eurest RU0020',
'ifFirstSeenTime' => '2016-07-21 02:38:35',
'ifNameSort' => 'Gi00001/00000/00001',
'ifLinkAggrInd' => 0,
'_client' => 0,
'ifPortFast' => 'enabled',
'VirtualNetworkMemberID' => '2110097521835802455',
'ifIndex' => 10101,
'ifAdminStatus' => 'up',
'ifLastChange' => '2019-01-22 00:30:07',
'ifLinkTrap' => 'disabled',
'DataSourceID' => 1,
'SwitchPortNumber' => 1,
'ifAlias' => 'WLAN AP LHR2045T2A1-A2-AP00628 - Eurest RU0020',
'ifMAC' => 'C8:F9:F9:B6:2B:81',
'Slot' => 1,
'InterfaceID' => '930862005556578080',
'ifType' => 'ethernet-csmacd',
'ifEncapsulationTag' => '1',
'ifOperStatus' => 'up',
'ifLowerLayer' => 0,
'DeviceID' => '4497534811023609856',
'ifPortControlInd' => 1,
'ifChangedCols' => 'PoEPower',
'Port' => 1,
'ifTrunkStatus' => 'off',
'ifSpeed' => 1000000000,
'ifLowerLayerInterfaceID' => undef,
'ifAdminDuplex' => 'Unsupported',
'ifEndTime' => undef,
'ifDuplex' => 'fullDuplex',
'DownstreamSwitchCount' => 0
}, 'NetMRI::API::Remote::V3_0_0::Interface' );

 

So the issue here is, what is NetMRI reporting?

The CLI (and SNMP poll) for this interface shows the value 17.1, yet NetMRI produces a result of 7301.

I dont know what this value refers to (or units).

The values dont correspond for any of the ports.

 

Russ

Re: POE from NetMRI

Superuser
Posts: 115
12540     0

Not sure about the above, try support

 

You can modify this code to get it

 

# BEGIN-SCRIPT-BLOCK
#
# Script-Filter:
#     $vendor eq "Cisco" and $sysdescr like /IOS/
#
# END-SCRIPT-BLOCK

use strict;
use warnings;

use NetMRI_Easy;

my $mem_line;
my @mem_array;
# Connect to the NetMRI
my $easy = new NetMRI_Easy;

# get the device id from the job engine.
my $device_id = $easy->device_id;

# retrieve the device
my $device = $easy->device;
#
# Create the custom field called memory if it does not already exist
#
$easy->broker->custom_fields->create_field({
  model => 'Device',
  name  => 'Power Total',
  type  => 'string',
});
$easy->broker->custom_fields->create_field({
  model => 'Device',
  name  => 'Power Used',
  type  => 'string',
});
$easy->broker->custom_fields->create_field({
  model => 'Device',
  name  => 'Power Available',
  type  => 'string',
});

# EDI-S6506-COR-1A#show power
# system power redundancy mode = combined
# system power total =     4618.32 Watts (109.96 Amps @ 42V)
# system power used =      1723.68 Watts (41.04 Amps @ 42V)
# system power available = 2894.64 Watts (68.92 Amps @ 42V)

foreach my $output_line (split /\r?\n/, $easy->send_command("show power")) 
{
#	$easy->log_message('info', $output_line);
	if ($output_line =~ m/system power total =/) {
#		  $easy->log_message('info', $output_line);
		  my @mem_array = split (/system power total =(.*)/, $output_line);
		  $mem_array[1] = chomp($mem_array[1]);
   	  	  $easy->log_message('info', , "Total Power - $mem_array[1]");
		  $easy->device->set_custom_field(power_total => $mem_array[1]);
	}
#	$easy->log_message('info', $output_line);
	if ($output_line =~ m/system power used =/) {
#		  $easy->log_message('info', $output_line);
		  my @mem_array = split (/system power used =(.*)/, $output_line);
		  $mem_array[1] = chomp($mem_array[1]);
   	  	  $easy->log_message('info', , "Power Used - $mem_array[1]");
		  $easy->device->set_custom_field(power_used => $mem_array[1]);
	}
	if ($output_line =~ m/system power available =/) {
#		  $easy->log_message('info', $output_line);
		  my @mem_array = split (/system power available =(.*)/, $output_line);
		  $mem_array[1] = chomp($mem_array[1]);
   	  	  $easy->log_message('info', , "Power Available - $mem_array[1]");
		  $easy->device->set_custom_field(power_available => $mem_array[1]);
	}
}
Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com

Re: POE from NetMRI

Guru
Posts: 23
12540     0

Thanks Sif. 

I will probably raise a support call to get clarification on this.

It is not clear what this PoE value represents. Certainly isnt anything obvious when looking at the Cisco stats.

 

It might be that I have to resort to custom fields - I am looking at interface stats (Power Inline) so will modify accordingly although I might resort to SNMP polling. 

 

Best regards

 

Russ

Re: POE from NetMRI

New Member
Posts: 1
12540     0

Did you contact support?

I had a similar problem, everything turned out to be much simpler. I replaced the power supply, but it did not help. In support I was advised to change the cable RJ-45, after errors disappeared and everything works fine. When I wrote an article about how to write a research paper quickly for students, I constantly lost the Internet and I could not continue my work. I hope this information was useful to you.

Re: POE from NetMRI

Expert
Posts: 70
12540     0
Russ, Did you ever get a resolution on this from your TAC case? I'm dealing with the same issue, now that 7.3.2 added LLDP-MED support. Thanks, -Marty

Re: POE from NetMRI

Expert
Posts: 70
12540     0

I think I figured out what's going on.  CLI "show power inline" shows the allocated power based on the class of device -- e.g., class 2 = 7.0W.  "show power inline police" shows "Operating power" - the actual draw by the device.  The values that NetMRI pulls and displays are the latter, but in units of milliwatts.  So 7301 = 7.301W.

At least that's what I figured from the LLDP display for PoE power (used).

 

Re: POE from NetMRI

Guru
Posts: 23
12540     0
Sorry for the delay. I have a rule on my Outlook account that carefully files various emails - unfortunately I forgot to look. Doh. 
 
With regards to the POE issue, no I didn't get anywhere with this. In the end, I decided to pull the information using Perl SNMP. 
The exercise was to present this information in a simple Web page for users who just need to look at port status for a device - so for me, SNMP retrieval wasn't an issue. There are other parameters that are in the POE MIB that were more relevant to what I was trying to present to the user.
 
The MIB is: 
cpeExtPsePortEntry - 1.3.6.1.4.1.9.9.402.1.2.1
 
In that, there are the following;

cpeExtPsePortPwrAllocated - 1.3.6.1.4.1.9.9.402.1.2.1.7
This object indicates the amount of power allocated from the
PSE for the PD.
 
and 

cpeExtPsePortPwrConsumption - 1.3.6.1.4.1.9.9.402.1.2.1.9
This indicates the actual power consumption of the PD
connected to this interface. It may not necessarily
be equal to the value of cpeExtPsePortPwrAvailable
 
Regards
 
Russ
 
Showing results for 
Search instead for 
Did you mean: 

Recommended for You