gstat/README.md

52 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2020-05-01 14:47:36 +02:00
# gstat
2020-07-24 23:26:23 +02:00
[![Build Status](https://cloud.drone.io/api/badges/hamburghammer/gstat/status.svg?ref=refs/heads/master)](https://cloud.drone.io/hamburghammer/gstat)
2020-10-20 16:47:04 +02:00
[![Go Report Card](https://goreportcard.com/badge/github.com/hamburghammer/gstat)](https://goreportcard.com/report/github.com/hamburghammer/gstat)
2020-07-24 23:20:11 +02:00
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.
2020-05-01 14:47:36 +02:00
2020-11-21 16:53:44 +01:00
This tool is part of a competition with [nhh](https://github.com/nhh) -> [Details](docs/competition.md)
2020-05-01 14:47:36 +02:00
**WIP: expect some changes for the stats gathering**
2020-05-01 14:47:36 +02:00
## Features
- Easy to use
- Single executable
- Runs on Linux
2020-05-01 14:47:36 +02:00
## Installation
For the time there are no binaries provided this means you need to install it through go.
2020-05-01 14:47:36 +02:00
Requirements:
- Go is installed.
- You have the `$GOPATH` defined.
- The `$GOPATH/bin` directory is in your `$PATH`.
2020-05-01 14:47:36 +02:00
Install and update it with `go get -u github.com/hamburghammer/gstat`.
2020-05-01 14:47:36 +02:00
## Usage
```
Usage:
gstat [OPTIONS]
2020-05-01 14:47:36 +02:00
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.
2020-05-01 14:47:36 +02:00
Help Options:
-h, --help Show this help message
```
*not all flags a jet supported or fully implemented!
example output:
2020-05-01 14:47:36 +02:00
`gstat -cmd`
```json
{"Date":"2020-11-21T16:32:18+01:00","CPU":3.49999999997029,"mem":{"used":5777,"total":16022},"disk":{"used":90319,"total":224323}}
```