Intel AMT Features > Event Manager > Use Cases > Get a Record from the Event Log
CollapseAll image

Get a Record from the Event Log

The following steps describe how to get a record from the Event Log.

1.  Retrieve the instance of AMT_MessageLog, where the “name” key equals “Intel(r) AMT:MessageLog 1”.

2.  Invoke AMT_MessageLog.GetRecord with the following parameters:

Parameter

Value

IterationIdentifier

An identifier for the iterator (the number of the record log)

 

Records have no header and the record data is combined of 21 binary bytes which can be read as shown in the following example:

struct {

UINT32 TimeStamp; 

UINT8 DeviceAddress;

UINT8 EventSensorType;

UINT8 EventType;

UINT8 EventOffset;

UINT8 EventSourceType;

UINT8 EventSeverity;

UINT8 SensorNumber;

UINT8 Entity;

UINT8 EntityInstance;

UINT8 EventData[8];

 

} EVENT_DATA;

3.  To understand the returned event record and the order of the event field values, use the following example:

<a:Body>

    <g:GetRecord_OUTPUT>

      <g:IterationIdentifier>1</g:IterationIdentifier> number of record

      <g:RecordNumber>1</g:RecordNumber>

      <g:RecordData></g:RecordData>     // time stamp (RecordData 1…4)

      <g:RecordData></g:RecordData>    

      <g:RecordData></g:RecordData>    

      <g:RecordData></g:RecordData>    

      <g:RecordData>255</g:RecordData>  // device address

      <g:RecordData>38</g:RecordData>   // event sensor type

      <g:RecordData>111</g:RecordData>  // event type

      <g:RecordData>6</g:RecordData>    // event offset

      <g:RecordData>104</g:RecordData>  // event source type

      <g:RecordData>10</g:RecordData>   // event severity

      <g:RecordData>255</g:RecordData>  // sensor number

      <g:RecordData>38</g:RecordData>   // entity

      <g:RecordData>97</g:RecordData>   // entity instance

      <g:RecordData>0</g:RecordData>    // event data (RecordData 14…21)

      <g:RecordData>0</g:RecordData>

      <g:RecordData>0</g:RecordData>

      <g:RecordData>0</g:RecordData>

      <g:RecordData>0</g:RecordData>

      <g:RecordData>0</g:RecordData>

      <g:RecordData>0</g:RecordData>

      <g:RecordData>0</g:RecordData>

      <g:ReturnValue>0</g:ReturnValue>

    </g:GetRecord_OUTPUT>

  </a:Body>

 

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$messageLogRef =$wsmanConnectionObject.NewReference("SELECT * FROM AMT_MessageLog WHERE Name='Intel(r) AMT:MessageLog 1'")

$inputObject =$messageLogRef.CreateMethodInput("GetRecord")

$inputObject.SetProperty("IterationIdentifier","1")

$outputObject =$messageLogRef.InvokeMethod($inputObject)

$returnValue =$outputObject.GetProperty("ReturnValue")

if($returnValue -like "0")

{

    $recordNumber =$outputObject.GetProperty("RecordNumber")

    $recordDataArray =$outputObject.GetProperty("RecordData")

}

 

 

Instance Diagram

Classes Used in This Flow

SDK Samples

If there is a sample demonstrating this flow, it is included in the SDK installation file. See SDK Installation Layout for details.

 

Copyright © 2006-2022, Intel Corporation. All rights reserved.