Skip to content

Instantly share code, notes, and snippets.

@dedeibel
Last active May 9, 2020 10:46
Show Gist options
  • Save dedeibel/71aa3053bc16b2423637ffcbfe20fae2 to your computer and use it in GitHub Desktop.
Save dedeibel/71aa3053bc16b2423637ffcbfe20fae2 to your computer and use it in GitHub Desktop.
Simple script to print the work unit progress of the folding at home client
#!/bin/bash
if [[ $1 == "-f" ]]; then
self=${0/[[:space:]]* -f/}
exec watch -n 5 $self
fi
systemctl status FAH\* \
| grep Active \
| sed -Ee 's/^\s+//'
FAHClient --send-command queue-info \
| sed -n '/^\[/,/^]/p' \
| jq -r '.[]|"\(.slot).\(.id):\t\(.percentdone)\t\(.eta)\tcredits: \(.creditestimate)\t(state: \(.state)\terror: \(.error))"' \
| sort -h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment