cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1173
Views
0
Helpful
1
Replies

Get cimc logs using cisco.imc powershell module

teamyankee
Level 1
Level 1

Hi, 

 

Are there any powershell examples to pull logs from the imc?  I'm trying to use powershell to get info like the "fault logs" or SEL logs.  Actually any examples of getting hardware status so that we can poll mulitple imc(s) for bad drives or any other failed hardware.

 

Have installed the cisco.imc modules and there isn't much docs on monitoring IMCs, mostly setting up and configuring IMC.

 

Thanks.

1 Reply 1

kkhlebop
Cisco Employee
Cisco Employee

After running Connect-Imc, you can try these 2 commands:

Get-ImcSyslog and Get-ImcSyslog

 

Extra info below:

 

I found these commands in Cisco.IM module.

To get a list of all commands in a module you can run: Get-Command -Module Cisco.IMC

To get a list of all of the modules you have installed you can run: 

Get-Module -ListAvailable

 

I have Powershell and Powershell-UCS installed on my MAC so I can run bash commands along with Powershell commands. This helps you narrow down the search.

Get-Module -ListAvailable | grep -i 'Cisco'

 

I see the 4 Cisco modules (Cisco.IMC, Cisco.UCS.Core, Cisco.UCSCentral, Cisco.UCSManager), and we need the Cisco.IMC one.

 

Then we can look for log|fault|event type of commands using this command - we are looking to view the logs so I also look for the Get word. Also I filter out the word "Catalog" as those show up when looking for log.

PS /Users/kkhlebop/Dropbox/src/imcsdk> Get-Command -Module Cisco.IMC | grep -iE "log|event|fault" | grep -vi catalog | grep -i get

Alias           Get-ImcTtyLog                                      2.5.1.6    Cisco.IMC
Function        FnGetImcTtyLog                                     2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcAdaptorFcPortFLogiProfile                   2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcAdaptorFcPortPLogiProfile                   2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcBiosPlatformDefaults                        2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcBiosVfIntelVirtualizationTechnology         2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcEventManagement                             2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcFault                                       2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcKmipServerLogin                             2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcPlatformEventFilters                        2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcSysdebugMEpLog                              2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcSyslog                                      2.5.1.6    Cisco.IMC
Cmdlet          Get-ImcSyslogClient                                2.5.1.6    Cisco.IMC

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:


This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community