Go to file
Augusto Dwenger 79db0bb6e5 Merge branch 'develop'
Include:
- Top 10 Process output
- Add CI setup
- Add Testify dependency
2020-08-07 11:53:31 +02:00
args Fix spelling 2020-05-30 15:02:46 +02:00
commands Fix bug if the process list is > 10 2020-08-07 11:45:33 +02:00
errors Add test for the Error func of the BaseError 2020-05-30 15:55:40 +02:00
.drone.yml Modify test job to test for sub packeges and output a cover report 2020-07-24 23:23:13 +02:00
.gitignore Add CPU reader 2020-05-29 14:38:27 +02:00
go.mod Start replacing custom assert func with stretchr/testify 2020-08-07 11:45:33 +02:00
go.sum Start replacing custom assert func with stretchr/testify 2020-08-07 11:45:33 +02:00
LICENSE Add the MIT license file 2020-07-24 23:15:05 +02:00
main.go Implement process list 2020-08-07 11:44:52 +02:00
main_internals_test.go Fix output format 2020-06-14 14:26:08 +02:00
README.md Change badge to point to master branch 2020-07-24 23:26:23 +02:00

gstat

Build Status

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:

  1. Wie groß ist das Binary
  2. Performance von Befehlen
  3. Cpu Auslastung
  4. 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