Go to file
Augusto Dwenger J. 381dd4819d
Merge pull request #7 from hamburghammer/docs
Add Docs
2020-11-25 14:06:49 +01:00
args Fix wrong argument descriptions 2020-11-15 20:25:31 +01:00
commands Merge pull request #6 from hamburghammer/develop 2020-11-15 20:08:18 +01:00
docs Add competition terms in side an own file 2020-11-21 16:57:56 +01:00
errors Add test for the Error func of the BaseError 2020-05-30 15:55:40 +02:00
.drone.yml Update CI scripts 2020-11-09 21:36:01 +01:00
.gitignore Add CPU reader 2020-05-29 14:38:27 +02:00
LICENSE Fix Copyright section 2020-08-10 20:23:36 +02:00
README.md Fix link to the competition details 2020-11-21 16:58:05 +01: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
main.go Move Date to the beginning of the JSON 2020-08-10 20:02:24 +02:00
main_internals_test.go Fix output format 2020-06-14 14:26:08 +02:00

README.md

gstat

Build Status Go Report Card

Is a cli tool to get some system stats in a machine parsable format (JSON). It supports only Linux but might also run on some UNIX based operation systems.

This tool is part of a competition with nhh -> Details

WIP: expect some changes for the stats gathering

Features

  • Easy to use
  • Single executable
  • Runs on Linux

Installation

For the time there are no binaries provided this means you need to install it through go.

Requirements:

  • Go is installed.
  • You have the $GOPATH defined.
  • The $GOPATH/bin directory is in your $PATH.

Install and update it with go get -u github.com/hamburghammer/gstat.

Usage

Usage:
  gstat [OPTIONS]

Application Options:
  -c, --cpu     Include the total CPU consumption.
  -m, --mem     Include the RAM usage.
  -d, --disk    Include the Disk usage.
  -p, --proc    Include the top 10 running processes with the highest CPU consumption.
      --health= Make a healthcheck call against the URI.

Help Options:
  -h, --help    Show this help message

*not all flags a jet supported or fully implemented!

example output:

gstat -cmd

{"Date":"2020-11-21T16:32:18+01:00","CPU":3.49999999997029,"mem":{"used":5777,"total":16022},"disk":{"used":90319,"total":224323}}