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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址