stats

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2016 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

type Process struct {
	// Exe is the executable that is running.
	Exe string
	// PID of the process
	PID int
	// Memory stats of the process
	Memory *memory.ProcessMemory
	// IO contains information about the IO of the machine.
	IO *io.ProcessIO
}

Process is information about a Linux process

type Stats

type Stats struct {
	// System specific information
	System struct {
		// Memory stats of the system
		Memory *memory.Memory
		// Network stats of the system
		Network *network.Network
	}

	// Processes are the process information of the system
	Processes []Process
}

Stats contains both the system and process statistics.

func New

func New(pids []int) (s *Stats)

New returns stats of the machine with pids filtering for processes. If pids are empty then it returns all process stats.

func (*Stats) Flat added in v0.2.1

func (n *Stats) Flat() string

Flat returns a flattened results.

func (*Stats) JSON

func (n *Stats) JSON() string

JSON returns JSON string of Stats

Jump to

Keyboard shortcuts

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