Skip to content
Snippets Groups Projects
Commit ef7919b1 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Print status.

* lysrdiff-status: New file.  Print some status information about the
  backup system.
parent 543b0b21
No related branches found
No related tags found
No related merge requests found
2006-10-30 Per Cederqvist <ceder@sedesopim.lysator.liu.se>
Print status.
* lysrdiff-status: New file. Print some status information about
the backup system.
2006-10-25 Per Cederqvist <ceder@sedesopim.lysator.liu.se>
Randomize new jobs.
......
#!/bin/sh
df -hl /lysrdiff/*/perm/lysrdiff
echo
statecache=/tmp/cached-state
for part in /lysrdiff/*/perm/lysrdiff
do
partno=`echo $part|sed 's%/lysrdiff/\([0-9]*\)/perm/lysrdiff%\1%'`
find $part/state -type f -printf " %TY-%Tm-%Td %TH:%TM:%TS $partno %P\n" \
| sort > $statecache.$partno.$$
mv -f $statecache.$partno.$$ $statecache-$partno
echo -n $partno':'
echo -n ' 'Tasks: `wc -l < $part/tasks`
echo -n ' 'Fresh: `find $part/state -name \*-start -ctime 0 -print|wc -l`
echo -n ' '1day: `find $part/state -name \*-start -ctime 1 -print|wc -l`
echo -n ' 'Stale: `find $part/state -name \*-start -ctime +1 -print|wc -l`
echo -n ' 'Tot: `ls $part/state/*-end|wc -l`
echo ' 'Err: `ls $part/state/*-fail 2>/dev/null|wc -l`
done
echo
echo Failures:
echo
grep -h -- '-fail$' $statecache-* | sort
echo
echo Top 5 most stale backups:
echo
grep -h -- '-start$' $statecache-* | sort | head -5
echo
echo All unfinished backup attempts:
echo
grep -h -- '-attempt$' $statecache-* | sort | head -5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment