Agent Presence

Agent Presence

Exactly what does AgentWatchdogShutdown do?

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi John,

An application calls AgentWatchdogShutdown to indicate its termination including:

  • A clean termination phase (the application was closed and didnt crash)
  • Application is terminated as a part of global shutdown

This call notifies Intel AMT that the application is terminated and it stops decrementing the application heartbeat counter.



That is interesting... so I have a local agent that is monitoring a process, all the while sending heartbeats within the prescribed time period to indicate that it is still running... when I kill the monitored application, my local agent makes the agentwatchdogshutdown call.

On the remote console, via watchdog enumeration I can see the status go from running to expired... so how does the timer expire if it is not decrementing any longer?

I am looking into this. Will get back to you soon.



Hi John,

Nice to hear from you on the forums. Of course, I always suggest using Commander and Outpost to try out the watchdog feature. I just tried it and if I run Outpost and have it heartbeat, I can remove the check box (to stop heartbeat) and the agent will go from "Running" to "Expired". If I remove the heartbeat agent completely in Outpost (using the remove button), Intel AMT Outpost will make the Shutdown call and the watchdog goes from "Running" to "Stopped".

Are you not getting this behavior? Try it out with the DTK to see if your platform has something different... it should really work.

Ylian (Intel AMT Blog)

My local agent code is very trivial really... it just loops on sending a heartbeat and then it sends a shutdown occasionally... I pause it in visual studio right after it sends the shutdown... when I look at my console (remote) side... which is looping once a second on a enumerate agents call, the state goes from running to expired... never indicating the stopped state. I even have done valid set actions and set cb policy on the console side.

Everything I write is based on the sdk. I will crank up your project and check it out...

ok... cranked up outpost and went to the watchdog tab... entered the information and specified notepad as the app to watch... when I completed the guid entry, the ok button became sensitive, so I pressed it.

went over to my management console and enumerated agents the again... the state indicates "expired"... so how do I make outpost start up... i.e. register and send heartbeats?

ok... my bad... Outpost works...

the thing I am thinking about now regarding my local agent code is the comment in the api doc regarding the WatchdogShutdown SessionSequenceNumber...

the doc indicates the call will appear successful, but the software tracked state is not being updated if the SessionSequenceNumber is malformed...

ok, with my local agent application, my shutdown call does update the state (it does transition from running to expired as monitored remotely) so I am assuming that the SessionSequenceNumber is not malformed...

could you please define "malformed"... perhaps my SessionSequenceNumber is not so malformed that the device will not change the sate, but it changes it to the wrong state?

ok... very cool... apparently my SessionSequenceNumber did not get incremented from the last heartbeat call to the shutdown call... so I bumped it up... just like I was going to do another heartbeat call... and then called shutdown and it works now!

Not to flame too much... ;)

This is another one of those Intel api calls that I hate... like some of the other AMT api calls, this one also returns success... even though the intended functionality of the call did not succeed... what I am trying to say is... if the call did not perform the operation expected, it should return NO SUCCESS... NOT SUCCESS. In this particular case... IMHO of course... it shouldreturn a code appropriate to indicate to the caller that the SessionSequenceNumber was malformed! Just my opinion of course.

Thanks Ylian... even though you did not solve my problem proper... you are always a great sounding board... it always helps to talk to you it seems. I think I got it from here... Hopefully.


Leave a Comment

Please sign in to add a comment. Not a member? Join today