mstat

package module
v0.0.0-...-040cfe8 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2013 License: MIT Imports: 5 Imported by: 0

README

mstat

Machine stats (memory, swap, filesystem) with JSON endpoints.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystem

type FileSystem struct {
	Total     uint64  `json:"total"`
	Free      uint64  `json:"free"`
	Used      uint64  `json:"used"`
	Available uint64  `json:"available"`
	Files     uint64  `json:"files"`
	FreeFiles uint64  `json:"freeFiles"`
	Percent   float64 `json:"percent"`
}

type Machine

type Machine struct {
	Unit string
	Next http.Handler
}

func New

func New() *Machine

func (*Machine) FileSystem

func (m *Machine) FileSystem(path string) FileSystem

func (*Machine) Memory

func (m *Machine) Memory() Memory

func (*Machine) ServeHTTP

func (m *Machine) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Machine) Swap

func (m *Machine) Swap() Swap

func (*Machine) Uptime

func (m *Machine) Uptime() Uptime

type Memory

type Memory struct {
	Total uint64 `json:"total"`
	Free  uint64 `json:"free"`
	Used  uint64 `json:"used"`
}

type Swap

type Swap struct {
	Total uint64 `json:"total"`
	Free  uint64 `json:"free"`
	Used  uint64 `json:"used"`
}

type Uptime

type Uptime struct {
	Time float64 `json:"time"`
}

Directories

Path Synopsis
examples
http command
martini command

Jump to

Keyboard shortcuts

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