On 08/17/2015 10:15 PM, Pratyush Anand wrote:
Hi,

I am looking for the best way to know if a watchdog has been kicked and active.

I can see a way is to read timeout(WDIOC_GETTIMEOUT) and  timeleft(
WDIOC_GETTIMELEFT). If they do not match, it means that wdt is active.

But what if we tried to read timeleft just in time when watchdog daemon/or some
other application had kicked it. May be we read timeleft twice at the interval
of 1 sec.

Please let me know if there is any other alternative which could be a better way
to know if watchdog is active?  Or may be it would be good to implement an ioctl
WDIOC_ACTIVE?


Normally the watchdog is active if the watchdog device is open, unless the
application controlling it explicitly disabled it with WDIOC_SETOPTIONS.
Therefore, the controlling application should always know the status.
A different application can not open the watchdog device, so it won't be
able to get its status using an ioctl anyway.

Why is that insufficient ?

Guenter

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to