mirror of
https://github.com/hamburghammer/gstat.git
synced 2024-12-21 23:47:41 +01:00
No description
|
||
---|---|---|
args | ||
commands | ||
docs | ||
errors | ||
.drone.yml | ||
.gitignore | ||
go.mod | ||
go.sum | ||
LICENSE | ||
main.go | ||
main_internals_test.go | ||
README.md |
gstat
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}}