From 64b660c427cdc8c25ac9540ebb2021a4de33b25b Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Tue, 19 Dec 2006 19:39:55 +0000
Subject: [PATCH] Print the most stale and freshest job per partition.

* lysrdiff-status: Do it.
---
 ChangeLog       |  3 +++
 lysrdiff-status | 14 ++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index bf1d4da..697ad90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-12-19  Per Cederqvist  <ceder@sedesopim.lysator.liu.se>
 
+	Print the most stale and freshest job per partition.
+	* lysrdiff-status: Do it.
+
 	Print job number when holding or stopping.
 	* backup-all: Print job number and total number of jobs when
 	stopping or holding.
diff --git a/lysrdiff-status b/lysrdiff-status
index 81257e4..82d57d1 100755
--- a/lysrdiff-status
+++ b/lysrdiff-status
@@ -34,6 +34,20 @@ echo Top 5 most stale backups:
 echo
 grep -h -- '-start$' $statecache-* | sort | head -5
 echo
+echo Most stale per part:
+echo
+for i in $statecache-*
+do
+    grep -h -- '-start$' $i | sort | head -1
+done
+echo
+echo Freshest per part:
+echo
+for i in $statecache-*
+do
+    grep -h -- '-start$' $i | sort | tail -1
+done
+echo
 echo All unfinished backup attempts:
 echo
 grep -h -- '-attempt$' $statecache-* | sort | head -5
-- 
GitLab