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

Powershell Invoke-Ncssh get the output

kwana

Hi, 

 

Do anyone know how to get the output after run "invoke-Ncssh -command "statistics periodic-show"?

 

Regards,

Alex

1 ACCEPTED SOLUTION

asulliva

Hello @kwana,

 

To add on to what @wronald said, the "statistics show-periodic" command will iterate forever.  This means that the Invoke-NcSsh cmdlet will never see the command end and will eventually timeout and "fail".  You can work around this by specifying the number of iterations...

 

Invoke-NcSsh "set adv -c off; statistics show-periodic -iterations 1"

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

4 REPLIES 4

wronald

To complete my answer, the command should look like:

 

Invoke-NcSsh "set adv -c off; statistics show-periodic"

 

This will display the same output you would have via SSH, in fact it is bridging the session to SSH via Putty Link.

 

Regards,

Ron

asulliva

Hello @kwana,

 

To add on to what @wronald said, the "statistics show-periodic" command will iterate forever.  This means that the Invoke-NcSsh cmdlet will never see the command end and will eventually timeout and "fail".  You can work around this by specifying the number of iterations...

 

Invoke-NcSsh "set adv -c off; statistics show-periodic -iterations 1"

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

BP_EMDCFMG

Hi 

How do I schdule it for evry hour to run?

 

 

wronald

Hi Alex,

 

What are you trying to do exactly?

If you would like to disply the output of the "statistics show-periodic" command, then you'll have to be in advanced or diag priviledged mode first.

 

You can also use the Statistics cmdlets directly:

                                                                                
Cmdlet          Get-NcClusterLogForwardStatistics                  4.3.0      DataONTAP                                                                                 
Cmdlet          Get-NcFcpAdapterStatistics                         4.3.0      DataONTAP                                                                                 
Cmdlet          Get-NcHaInterconnectPerformanceStatistics          4.3.0      DataONTAP                                                                                 
Cmdlet          Get-NcHaInterconnectSGLStatistics                  4.3.0      DataONTAP                                                                                 
Cmdlet          Get-NcIscsiStatistics                              4.3.0      DataONTAP                                                                                 
Cmdlet          Get-NcLunStatistics                                4.3.0      DataONTAP                                                                                 
Cmdlet          Get-NcMetroclusterOperationStatistics              4.3.0      DataONTAP                                                                                 
Cmdlet          Get-NcNameServiceDNSStatistics                     4.3.0      DataONTAP                                                                                 
Cmdlet          Get-NcNameServiceNisStatistics                     4.3.0      DataONTAP     

 

I hope this helps you further.

 

Regards,

Ron

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