Skip to content

Instantly share code, notes, and snippets.

@pingec
Last active September 27, 2018 16:17
Show Gist options
  • Save pingec/36efe3f39b5be9bf94c46c00f93875d0 to your computer and use it in GitHub Desktop.
Save pingec/36efe3f39b5be9bf94c46c00f93875d0 to your computer and use it in GitHub Desktop.
Ipmi watchdog to hard reset machine in case it freezes / crashes
function Get-TimeStamp {
return "[{0:yyyy-MM-dd} {0:HH:mm:ss}]" -f (Get-Date)
}
function Watchdog-Set() {
"$(Get-TimeStamp) Initializing watchdog timer..." >> "$PSScriptRoot\log.txt"
& "$PSScriptRoot\ipmiutil.exe" wdt -a 1 -t 120 -e
}
Watchdog-Set
for () {
Start-Sleep -s 90
& "$PSScriptRoot\ipmiutil.exe" wdt -r
}
@pingec
Copy link
Author

pingec commented Apr 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment