From 7ff45091c78f8fe84454029df76468f8a0c08a0e Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Mon, 25 Dec 2023 10:23:18 +0100 Subject: [PATCH] fix: added attribution to various stuff --- README.md | 10 ++++++++++ main.go | 1 + 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index b1bb1a2..c75c546 100644 --- a/README.md +++ b/README.md @@ -74,3 +74,13 @@ $ time ( echo '' | nc 12345 ) # stop and disable the systemd service on all nodes $ parallel --nonall --slf nodes.txt 'systemctl disable --now stats-server.service' ``` + +## Credits + +- The shell code for the commands was originally made by [@BachoSeven](https://github.com/bachoseven) + + + +- Most of the code was initially made with the help of ChatGPT in this conversation + + \ No newline at end of file diff --git a/main.go b/main.go index ded930f..04c2b52 100644 --- a/main.go +++ b/main.go @@ -25,6 +25,7 @@ ExecStart=/usr/local/bin/stats-server serve WantedBy=default.target `) +// commands is a map of commands that can be run on the server, originally made by https://github.com/bachoseven var commands = map[string]string{ "cpu": `top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | sed "s/^/100 - /" | bc`, "memory": `free -m | awk '/Mem/{print $3 " " $2}'`,