mirror of
https://github.com/hamburghammer/gstat.git
synced 2024-05-17 04:34:37 +02:00
a12b6d3c64
Adds Disk and Memory stats. |
||
---|---|---|
args | ||
commands | ||
errors | ||
.gitignore | ||
go.mod | ||
go.sum | ||
main.go | ||
main_internals_test.go | ||
README.md |
gstat
Is a tool to get the system stats in a parsable format. The tool is part of the competition with Niklas.
Checkout his solution: cstat
Terms of the competition
Allgemein:
Name des Programms: - cstat - gstat
Das Tool kann mehrere Metriken auf einmal zurückgeben.
Anforderung:
- Aktuelle CPU Auslastung
- Gesamtverbrauch aller CPU Kerne in %
- Die nach cpu sortierten Prozesse als Liste
- Aktueller Speicherplatzverbrauch
-used / free in megabyte
- Aktueller RAM Verbrauch
- used / free in megabyte
- Healthchecks mit Latency
- http / https / *ICMP*
- GET /
- *Aktueller Network IO (optional)*
- *Disk IO (optional)*
- JSON Output
- Datum und Uhrzeit im ISO Format
Kriterien:
- Single Executable
- Linux
Bewertungs:
- Wie groß ist das Binary
- Performance von Befehlen
- Cpu Auslastung
- Ram Auslastung
Kommandozeilenaufrufe:
Alphabetische Reihenfolge
-c -h -d // --healtheck=http://example.com --disk --format=json
https://de.wikipedia.org/wiki/Uniform_Resource_Identifier
$ cstat/gstat --cpu --format=json
$ cstat/gstat --metric=disk
$ cstat/gstat --check
Goals:
cstat/gstat -c -d -i -h https://my-server.com > log.json
curl -X POST -d $(cstat/gstat -c -d -i -h https://my-server.com) https://my-logging.com/logs