The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Microsoft Virtualization Discussions

Issue with Invoke-NcSystemApi

Jaiwaghela

I am encountering a strange issue using Invoke-NcSystemApi. I am trying to get the output of ifstat <portname> using this cmdlet. So what happens that each time the script runs I get output for only some ports and others are skipped. For ex: In the below output I pasted port e0b and e0d are skipped. Please have a look at the script below. Would really appreciate if someone can help...

 

=====================================================================================

 

 

Import-Module Dataontap
$UserName ="admin"

$ControllerPassword =ConvertTo-SecureString “netapp123” -AsPlainText -Force
$ControllerCredential = New-Object System.Management.Automation.PsCredential($UserName,$ControllerPassword)
$ips=@()
$ips=("192.168.0.10")
foreach($ip in $ips)
{

Connect-NcController -Name $ip -Credential $ControllerCredential

$nodes = (Get-NcNode).Node
$portlist = Get-NcNetPort
foreach($pl in $portlist)
{
$plist = $pl.Port
$nlist = $pl.Node
$nlist
$nplist


$api = $("<system-cli><args><arg>"+("system node run -node $nlist -command ifstat $plist" -join "</arg><arg>")+"</arg></args></system-cli>")
$output = Invoke-NcSystemApi -Request $api -ErrorAction Stop
$output.results.'cli-output'
$output.results.'cli-result-value'

}
}
==========================================================================================================

 

Output :

 

PS C:\Users\jaiw> C:\Users\jaiw\Videos\scriptvvvvv.ps1

 

Name Address Vserver Version
---- ------- ------- -------
192.168.0.10 192.168.0.10 NetApp Release 9.4: Fri Jun 08 22:50:12 UTC 2018

 

cluster1-01
e0a

-- interface e0a (3 hours, 6 minutes, 32 seconds) --

RECEIVE
Total frames: 5318 | Frames/second: 0 | Total bytes: 508k
Bytes/second: 45 | Total errors: 0 | Errors/minute: 0
Total discards: 0 | Discards/minute: 0 | Multi/broadcast: 1256
Non-primary u/c: 0 | CRC errors: 0 | Runt frames: 0
Fragment: 0 | Long frames: 0 | Jabber: 0
Alignment errors: 0 | No buffer: 0 | Xon: 0
Xoff: 0 | Pause: 0 | Jumbo: 0
Noproto: 0 | Error symbol: 0 | Illegal symbol: 0
Bus overruns: 0 | Queue drops: 0 | LRO segments: 0
LRO bytes: 0 | LRO6 segments: 0 | LRO6 bytes: 0
Bad UDP cksum: 0 | Bad UDP6 cksum: 0 | Bad TCP cksum: 0
Bad TCP6 cksum: 0 | Mcast v6 solicit: 0
TRANSMIT
Total frames: 16380 | Frames/second: 1 | Total bytes: 21760k
Bytes/second: 1944 | Total errors: 0 | Errors/minute: 0
Total discards: 0 | Queue overflow: 0 | Multi/broadcast: 0
Max collisions: 0 | Single collision: 0 | Multi collisions: 0
Late collisions: 0 | Xon: 0 | Xoff: 0
Pause: 0 | Jumbo: 0 | Cfg Up to Downs: 4
TSO non-TCP drop: 0 | Split hdr drop: 0 | Timeout: 0
TSO segments: 0 | TSO bytes: 0 | TSO6 segments: 0
TSO6 bytes: 0 | HW UDP cksums: 0 | HW UDP6 cksums: 0
HW TCP cksums: 16102 | HW TCP6 cksums: 0 | Mcast v6 solicit: 0
DEVICE
Mcast addresses: 1 | Rx MBuf Sz: 0
LINK INFO
Speed: 1000m | Duplex: full | Flowcontrol: none
Media state: active | Up to downs: 5

 

1

 

cluster1-01
e0b

1

 

cluster1-01
e0c

-- interface e0c (3 hours, 12 minutes, 4 seconds) --

RECEIVE
Total frames: 20235 | Frames/second: 2 | Total bytes: 3549k
Bytes/second: 308 | Total errors: 0 | Errors/minute: 0
Total discards: 0 | Discards/minute: 0 | Multi/broadcast: 1236
Non-primary u/c: 0 | CRC errors: 0 | Runt frames: 0
Fragment: 0 | Long frames: 0 | Jabber: 0
Alignment errors: 0 | No buffer: 0 | Xon: 0
Xoff: 0 | Pause: 0 | Jumbo: 0
Noproto: 0 | Error symbol: 0 | Illegal symbol: 0
Bus overruns: 0 | Queue drops: 0 | LRO segments: 0
LRO bytes: 0 | LRO6 segments: 0 | LRO6 bytes: 0
Bad UDP cksum: 0 | Bad UDP6 cksum: 0 | Bad TCP cksum: 0
Bad TCP6 cksum: 0 | Mcast v6 solicit: 0
TRANSMIT
Total frames: 47132 | Frames/second: 4 | Total bytes: 55507k
Bytes/second: 4817 | Total errors: 0 | Errors/minute: 0
Total discards: 0 | Queue overflow: 0 | Multi/broadcast: 0
Max collisions: 0 | Single collision: 0 | Multi collisions: 0
Late collisions: 0 | Xon: 0 | Xoff: 0
Pause: 0 | Jumbo: 0 | Cfg Up to Downs: 0
TSO non-TCP drop: 0 | Split hdr drop: 0 | Timeout: 0
TSO segments: 0 | TSO bytes: 0 | TSO6 segments: 0
TSO6 bytes: 0 | HW UDP cksums: 0 | HW UDP6 cksums: 0
HW TCP cksums: 46986 | HW TCP6 cksums: 0 | Mcast v6 solicit: 0
DEVICE
Mcast addresses: 2 | Rx MBuf Sz: 0
LINK INFO
Speed: 1000m | Duplex: full | Flowcontrol: none
Media state: active | Up to downs: 2

 

1

 

cluster1-01
e0d

1

 

PS C:\Users\jaiw>

0 REPLIES 0
Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public