You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
This script is working fantastic, but I am having trouble setting up a deadmans switch for if linux hangs, such as you described in the readme. Is this code snippit missing from this script, or does it have to be setup manually? I cannot find any references to this online.
The text was updated successfully, but these errors were encountered:
Hi, well indeed it's not part of the script published here, I actually haven't had time to refactor it according to the latest wanted adds that were planned (my own R720's board is actually dying, and since I'm moving to new servers, it hasn't even been in my scope the last few months).
The deadman switch was mainly discussed as an indication of what a savvy user would/should do, but that has to be more tailored to the person's setup and would clog that already wonky/messy code dump.
(again, this repo is just me sharing a part of my cron scripts after sanitizing them/truncating the parts that are specific to my setup, so the deadman switch got axed)
In truth, you can do that more simply, running on a second machine a cronjob that just pings your server every so often, and if no answer a couple of times, sets the fans to auto.
Typically you would run it on something like a raspberry pi or an intel compute stick, aka a low powered host dedicated to menial not-compute-heavy but critical tasks that you just never work on and has to to run ALWAYS (like pihole, log aggregation server, UPS server, etc)
Something like that should do the job as a deadman switch:
#!/bin/bash#the IP address of your target iDrac
IPMIHOST=192.168.0.42
#the IP address of your target Host/Hypervisor
CHECKHOST=192.168.0.40
#iDrac user
IPMIUSER=root
#iDrac password (calvin is the default password)
IPMIPW=calvin
#YOUR IPMI ENCRYPTION KEY
IPMIEK=0000000000000000000000000000000000000000
DATE=$(date '+%d/%m/%Y %H:%M:%S')if ping -c 1 $CHECKHOST&> /dev/null ;thenecho"$DATE : Target is up and reachable"elseecho"$DATE : Host is unreachable, maybe hang?"
sleep 10
if ping -c 1 $CHECKHOST&> /dev/null ;thenecho"$DATE : Target is up and reachable, all good."elseif ping -c 1 $IPMIHOST&> /dev/null ;thenecho"$DATE : Target is unreachable twice, play safe."
ipmitool -I lanplus -H $IPMIHOST -U $IPMIUSER -P $IPMIPW -y $IPMIEK raw 0x30 0x30 0x01 0x01
elseecho"$DATE : TargetIPMI also unreachable? Either the whole Target is down, or this host is offline."fififiexit
Hello,
This script is working fantastic, but I am having trouble setting up a deadmans switch for if linux hangs, such as you described in the readme. Is this code snippit missing from this script, or does it have to be setup manually? I cannot find any references to this online.
The text was updated successfully, but these errors were encountered: