Skip to content

Instantly share code, notes, and snippets.

@alxcancado
alxcancado / check_hashrate_reboot.py
Created May 4, 2018 18:08 — forked from jaydlawrence/check_hashrate_reboot.py
Script to check the hashrate of ethereum worker on ethOs and reboot if the hashrate is 0 for 2 runs of this script. This script is for a single GPU, or rather it will only reboot if the overall hashrate reaches 0. It also uses the pushover service to push notifications for when the script triggers a reboot.
import subprocess
import os
import re
import sys
import argparse
import httplib, urllib
import time
"""
# place this file at /home/ethos/check_hash_reboot.py
@alxcancado
alxcancado / rigcheck.sh
Created May 4, 2018 18:20
Checks for crashed ethOS mining processes
#!/bin/bash
LOG_FILE=/tmp/rigcheck.log
if grep -qv active /var/run/ethos/status.file; then
echo "$(date) Mining not active or currently starting, exiting..." | tee -a ${LOG_FILE}
exit 0
fi
NUM_PROC=`ps uax| egrep "ccminer|cgminer-skein|claymore|dstm-zcash|ethminer|ethminer-amd|ewbf-zcash|sgminer-gm|silentarmy|optiminer-zcash" | grep -v "curl" | grep -v "update-miner" | grep -v grep | awk '{print $2}' | wc -l`
NUM_GPU=`cat /var/run/ethos/gpulist.raw | wc -l`
NEEDS_RESTART=false
if [ "${NUM_PROC}" != "${NUM_GPU}" ]; then
@alxcancado
alxcancado / _verify-repair-permissions-disk.md
Created May 5, 2019 22:54 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@alxcancado
alxcancado / docker-swarm-architecture.md
Created February 27, 2024 22:43 — forked from scyto/docker-swarm-architecture.md
My Docker Swarm Architecture