dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
598 stars 276 forks source link

Query uptime #217

Closed b4ldr closed 2 years ago

b4ldr commented 2 years ago

Hi i wasn't sure there the best p[lace to ask was. I'm trying to pull the uptime for the idrac card (not the OS) via redfish. anyone have pointers

texroemer commented 2 years ago

Hi @b4ldr

Currently there is no Redfish property to get iDRAC uptime but this data is exposed in the dumplogs file from SupportAssist collection. Run SupportAssist collection to get iDRAC debug logs and in folder "tsr\dbglog\logs\dumplogs" you will see dumplogs file which contains this data.

Example snippet from this file:

Start dumping iDRAC logs

iDRAC Uptime..

 13:07:28 up  1:43,  0 users,  load average: 14.09, 13.19, 12.74
Tue Jun 14 13:07:28 CDT 2022

I'll also escalate this concern to iDRAC internal teams and see if a property can be exposed to simplify getting this data.

Thanks Tex

b4ldr commented 2 years ago

Thanks for the quick response, I'm not sure the dumplogs will work in this case. However it's useful to get confirmation it is not exposed, so I can stop looking :). Also thanks for raising it internally if there is something I can do to escalate it via our sales rep please let me know

texroemer commented 2 years ago

Found it :) it was under SupportAssist attribute group, reason i missed it. Run GET on URI "/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/DellAttributes/iDRAC.Embedded.1?$select=Attributes/SupportAssist.1.iDRACFirstPowerUpDateTime" to get this timestamp.

Example:

C:\Python39>GetIdracLcSystemAttributesREDFISH.py -ip 192.168.0.130 -u root -p calvin --group-name idrac --attribute-name SupportAssist.1.iDRACFirstPowerUpDateTime

Attribute Name: SupportAssist.1.iDRACFirstPowerUpDateTime, Current Value: Wed Oct 06 19:40:54 GMT 2021