From 73be1f6de87f6cb6b4337bbc837033ec446d8306 Mon Sep 17 00:00:00 2001 From: gennyble Date: Sun, 16 Feb 2025 10:18:07 -0600 Subject: statistics page start --- served/statistics.html | 42 ++++++++++++++++++++++++++++++++++++++++++ served/styles/statistics.css | 23 +++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 served/statistics.html create mode 100644 served/styles/statistics.css diff --git a/served/statistics.html b/served/statistics.html new file mode 100644 index 0000000..32ba2bc --- /dev/null +++ b/served/statistics.html @@ -0,0 +1,42 @@ +--- +template=post +title=Starlight Statistics +style=/styles/post.css +style=/styles/statistics.css + +use-template= +system-stats= +--- + +starlight is the server that runs my website, and thus my webserver. +I've been wanting to build a little monitoring/system stats thing +for awhile, and I can't think of a reason I care about to not make +it public. Maybe you'll find it interesting, anyways. + +Graphs are unanimated GIFs and, currently, have no concept of time. +Samples are taken every minute and graphs are generated every fifteen, +so data should be reasonably current. + +[@paragraphs off] +
+
+

Memory

+ +

+ parsed from /proc/meminfo +

+

+ total: {stats.mem.total}MB
+ usage: {stats.mem.usage}MB
+

+
+ +
+

Network

+ +

+ parsed from /proc/net/dev
+ receive in blue, transmit in green +

+
+
\ No newline at end of file diff --git a/served/styles/statistics.css b/served/styles/statistics.css new file mode 100644 index 0000000..2b9bb61 --- /dev/null +++ b/served/styles/statistics.css @@ -0,0 +1,23 @@ +#hostmeminfo, +#hostnetinfo { + width: 256px; + height: 160px; + image-rendering: pixelated; + border: 1px solid var(--text); +} + +.stat { + h2 { + margin: 0; + } + + p:first-of-type { + margin-top: 0; + } +} + +#stats { + display: grid; + grid-template-columns: 1fr 1fr; + column-gap: 0.5rem; +} \ No newline at end of file -- cgit 1.4.1-3-g733a5