Intel® Business Client Software Development
Support for Intel® vPro™ software development and technologies associated with Intel vPro platforms.

Detecting Wake-on-Alarm Clock using C#

David_H_Intel2
Employee
577 Views
Hi,
I am struggling to understand how to read the ME Event Log using C# - specifically, to detect that the system has been woken by the AMT Alarm Clock, based on the content of this page:
http://software.intel.com/en-us/articles/intel-active-management-technology-pc-alarm-clock/

However, the Intel Manageability and Security Status app on the AMT client shows no event, and my attempts to program a suitable filter using this information...
http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/DOCS/Implementation%20and%20Reference%20Guide/default.htm?turl=WordDocuments%2Fretrievethecurrentalarmclocksettings.htm

..and the Manageability Commander tool from the DTK, just result in MC application errors. The "WS-Management Event Log Reader" VBS sample from the SDK doesn't show any appropriate events, either.
I should add that the client is correctly provisioned (SMB/Digest mode) and other events (e.g. KVM session initiation) are logged correctly. I am able to program Alarm Clock wake-ups and they work.
I believe I need to create an event filter and subscriber, but I'm stuck!
My language of preference is C#; could anyone offer me some pointers as to how to correctly detect this class of event?

Many thanks in advance!
0 Kudos
3 Replies
Lance_A_Intel
Employee
577 Views
Hello,
Please refer to the AMD SDK documentation pageGet a Record from the Event Log: http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/DOCS/Implementation%20and%20Reference%20Guide/WordDocuments/getarecordfromtheeventlog.htm

Information in the AMT SDK documentation on the Alarm Clock event is located here: http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/DOCS/Implementation%20and%20Reference%20Guide/WordDocuments/hostwakeupnotificationalert.htm

There is a C++ sample in the AMT SDKthat shows how to read the event log located at \Windows\Intel_AMT\Samples\WS-Management\EventLogReader.
Unfortunately there is no C# sample. I would recommend looking at one of the C# samples that is available in the SDK to see how the code works, then work from C++ sample to create what you need in C#.
0 Kudos
David_H_Intel2
Employee
577 Views
Lance,

Thanks for your response!
I've already read both the SDK doc pages that you refer to, and have had some success pulling the records from AMT_Messagelog (although I haven't yet quite figured out how to enumerate the RecordData elements in Powershell).
I can see the events in the event log via the WebUI, e.g
18 11/21/2011 5:16 pm Intel AMT Host woken from S5 state by alarm clock policy.

However, the examples all seem to be based around connecting remotely to the AMT client. Perhaps I didn't make myself sufficiently clear; what I'm trying to do is read the event log on the local machine, so that I can differentiate "I was awakened by the Alarm Clock" versus all other wake-up causes.
The Alarm Clock documentation page that I linked to (http://software.intel.com/en-us/articles/intel-active-management-technology-pc-alarm-clock/)
..alludes to this:

"6. The local agents determine that the PC Alarm Clock woke the system and they run their assigned tasks."

All I'm trying to do is implement this particular capability.

Can you offer any further guidance?

Thanks!
0 Kudos
Gael_H_Intel
Moderator
577 Views

Hi - have you tried this using the "Open Source" DTK? You can also download the source code and it's in C# so you might be able to move forward from there.

The Host Wake Up Notification Alert is not a PET event - so it isn't an event that you could subscribe to.(I'm not sure if this is what you are trying to do, however...

When the PC Alarm Clock wakes a system, an entry is added to the Intel AMT event log that provides two key pieces of information. It indicates that the system was awakened by PC Alarm Clock and it provides the previous sleep state of the system. When the system wakes, the local agent can read the log and look for this event. If the event is present then the agent knows that the wake was due to the PC Alarm Clock and it can proceed with its scheduled tasks. (look at this doc)

0 Kudos
Reply