watchdog_set...hw_keepalive(9)
π NAME π
watchdog_set_last_hw_keepalive β okay so this one sets the last HW keepalive time for a watchdog, bestie β¨ (yes it's a whole mouthful, we love her anyway)
π SYNOPSIS π
int watchdog_set_last_hw_keepalive (struct watchdog_device *wdd ,
unsigned int last_ping_ms );
πΈ ARGUMENTS πΈ
wddβ the watchdog device itself, like the actual struct, the main character πlast_ping_msβ time since last HW heartbeat β±οΈ so basically "how long ago did this thing last get a lil ping"
π¦ DESCRIPTION π¦
So this function adjusts the last known HW keepalive time for a watchdog timer, no cap. Why do you even need it?? Okay so picture this: the watchdog is already running by the time the probe function gets called, and it literally can't be pinged immediately π β that's the exact situation this exists for.
Two things you gotta know, and I'm being so serious rn:
This function must be called immediately after watchdog registration, and min_hw_heartbeat_ms must be set for this to be useful. Like, both of those. Periodt. π
β RETURN β
0 if successful, error otherwise. That's it, that's the vibe check π (zero equals slay, anything else equals not slay)
π SEE ALSO π
Kernel file ./drivers/watchdog/watchdog_dev.c, plus the whole friend group:
watchdog_ping(9)watchdog_start(9)watchdog_stop(9)watchdog_get_status(9)watchdog_set_timeout(9)watchdog_set_pretimeout(9)watchdog_get_timeleft(9)watchdog_ioctl_op(9)watchdog_write(9)watchdog_ioctl(9)watchdog_open(9)watchdog_release(9)watchdog_cdev_register(9)watchdog_cdev_unregister(9)watchdog_dev_register(9)watchdog_dev_unregister(9)watchdog_dev_init(9)watchdog_dev_exit(9)
okay that's the whole page, you ate that π«Ά this iconic lil doc lives in ./drivers/watchdog and it's dated October 2026 β mwah, go ping something ππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms