This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
pool=zdata | |
devices=$(zpool status -P $pool | grep /dev/ | awk '{print $1}') | |
intervalinsec=120 | |
while true; do | |
zpool iostat -HyL zdata $intervalinsec 1 | | |
grep -q '0 0 0 0' ; res=$? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import machine | |
import time | |
uart = machine.UART(1, baudrate=115200, tx=machine.Pin(4), rx=machine.Pin(5), timeout=20) | |
while True: | |
if uart.any(): | |
res = uart.readline().decode('utf-8') | |
if 'U-Boot Boot Menu' in res: | |
print('yes') | |
uart.write('') |
OlderNewer