stat

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

README

gokrazy/stat

Go Report Card

gokrazy/stat is a program to visualize resource usage, producing output that looks very similar to Dag Wieers’s dstat default output.

As the repository path implies, this program is meant to be used on the https://gokrazy.org/ Raspberry Pi platform, so it does not have any external runtime dependencies and is implemented natively in Go (not using any cgo). The resulting static binary might come in handy in other Linux environments, too!

github.com/gokrazy/stat/cmd/gokr-webstat

gokr-webstat displays system resource usage in your browser, with output matching gokr-stat or dstat!

It uses the EventSource API to stream new lines into your browser.

webstat screenshot

github.com/gokrazy/stat/cmd/gokr-stat

The gokr-stat program is a terminal program that displays system resource usage, like dstat.

Here is the gokr-stat terminal output (via gokrazy/breakglass) when scanning one double-sided piece of A4 paper with scan2drive on a Raspberry Pi 4:

stat terminal output

Documentation

Index

Constants

View Source
const (
	UnitNone = iota
	UnitBytes
	UnitBytesFloat
	UnitMetric
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Col

type Col struct {
	Type       ColType
	ValU64     uint64
	ValInt     int     // used by ColPercentage
	ValFloat64 float64 // used by UnitBytes
	Unit       int
	Width      int
	Scale      int
}

func ByteCol

func ByteCol(v uint64) Col

func MetricCol

func MetricCol(v uint64) Col

func (Col) HTML

func (c Col) HTML() string

func (Col) String

func (c Col) String() string

func (Col) WithWidth

func (c Col) WithWidth(w int) Col

type ColType

type ColType int
const (
	ColGauge ColType = iota
	ColPercentage
)

Directories

Path Synopsis
cmd
internal
cpu
mem
net
sys

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL