Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStatsBrief ¶
Returns brief system stats, enough to identify the machine. For more in-depth metrics, use GetStats.
Types ¶
type StatsFS ¶
type StatsFS struct { // Disk device name Device string `json:"device"` // Mount type Type string `json:"type"` // Mount path Mount string `json:"mount"` // Free space Free uint64 `json:"free"` // Used space, for conveniency Used uint64 `json:"used"` // Available space Available uint64 `json:"available"` // Total disk size Size uint64 `json:"size"` }
Type StatsFS contains a single disk/mount information parsed from /proc/self/mountinfo.
type StatsLocation ¶
type StatsLocation struct { // Name of the location. Not required Name string `json:"name,omitempty"` // For the purpose of this project, this should always be "Point" Type string `json:"type"` // Coordinate array for the GeoJSON object. Longitude goes first as per spec Coordinates []float64 `json:"coordinates"` // Sensor elevation/altitude Elevation float64 `json:"elevation"` }
Type StatsLocation provides static location information as defined in the node local configuration. The type is GeoJSON compatible.
type StatsMemory ¶
type StatsMemory struct { // The amount of physical RAM, in kibibytes, left unused by the system Free uint64 `json:"free"` // Total amount of usable RAM, in kibibytes, which is physical RAM minus a number of reserved bits and the kernel binary code Total uint64 `json:"total"` // Estimate of how much memory is available for starting new applications, without swapping Available uint64 `json:"available"` // The amount, in kibibytes, of temporary storage for raw disk blocks Buffers uint64 `json:"buffers"` // The amount of physical RAM, in kibibytes, used as cache memory Cached uint64 `json:"cached"` // The total amount of swap free, in kibibytes SwapFree uint64 `json:"swap_free"` // The total amount of swap available, in kibibytes SwapTotal uint64 `json:"swap_total"` }
Type StatsMemory contains memory status information parsed from /proc/meminfo.
type StatsNetwork ¶
type StatsNetwork struct { // List of realized network devices as returned by gonetworkmanager.NetworkManager.GetDevices() Devices []gonetworkmanager.Device `json:"devices"` // General connection status as reported by gonetworkmanager.NetworkManager.State() Status string `json:"status"` }
Type StatsNetwork contains network device information by using NetworkManager's DBus interface.
type StatsSensor ¶
type StatsSensor struct { // General sensing status Status sensor.StatusEnum `json:"status"` // Current campaign ID (if running) or null (if free) CampaignId string `json:"campaignId,omitempty"` }
Type StatsSensor reports sensor status information (busy/free, campaign ID, etc.).
Click to show internal directories.
Click to hide internal directories.