summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e4f3d0)
raw | patch | inline | side by side (parent: 7e4f3d0)
author | Ian Kelling <ian@iankelling.org> | |
Wed, 16 Oct 2019 21:07:51 +0000 (17:07 -0400) | ||
committer | Ian Kelling <ian@iankelling.org> | |
Wed, 16 Oct 2019 21:07:51 +0000 (17:07 -0400) |
system-status | patch | blob | history |
diff --git a/system-status b/system-status
index 25a637ee9606788c97e22949b470a811428abf16..460d63be5c33385e03f580d03ecb41e5e9687132 100755 (executable)
--- a/system-status
+++ b/system-status
## check if last snapshot was within an hour
vol=o
- snaps=(/mnt/root/btrbk/$vol.20*)
+ # this section generally copied from btrbk scripts, but
+ # this part modified to speed things up by about half a second.
+ # I'm not sure if its quite as reliable, but it looks pretty safe.
+ # Profiled it using time and also adding to the top of the file:
+ # set -x
+ # PS4='+ $(date "+%2N") '
+ snaps=($(ls -1avdr /mnt/root/btrbk/$vol.20*|head -n1))
now=$(date +%s)
maxtime=0
for s in ${snaps[@]}; do