summaryrefslogtreecommitdiff
path: root/uptime-stats.gmi.tpl
blob: 178a43edf33046005aa6a01ac2bbc0350345351e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<< template::dynamic
# My machine uptime stats

<< echo "> This site was last updated at $($DATE $DATE_FORMAT)"

The following stats were collected via `uptimed` on all of my personal computers over many years and the output was generated by `goprecords`, the global uptime records stats analyser of mine.

> Uptimed is an uptime record daemon keeping track of the highest uptimes a computer system ever had. It uses the system boot time to keep sessions apart from each other.

=> https://github.com/rpodgorny/uptimed
=> https://github.com/snonux/goprecords

Also check out my blog post:

=> ./gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.gmi Unveiling `guprecords.raku`: Uptime records with Raku (and also there is a version in Go now)

<<<
  GOPRECORDS_GEMTEXT_URL='https://goprecords.f3s.buetow.org/report?all=true&output-format=Gemtext&limit=20'
  tmp=$(mktemp)
  if curl -fsS --max-time 30 -o "$tmp" "$GOPRECORDS_GEMTEXT_URL" \
      && [ -s "$tmp" ] \
      && ! grep -q '<!DOCTYPE html' "$tmp" \
      && grep -q '^## Top' "$tmp"; then
      echo "> Uptime stats were last updated $(date)"
      echo
      cat "$tmp"
      rm -f "$tmp"
  else
      rm -f "$tmp"
      $SED -n '/Top/,$p' uptime-stats.gmi
  fi
>>>