Documentation
¶
Overview ¶
package nodeinfocollect has all the methods for collecting the information for nodeinfo
package nodeinfocollect has all the methods for collecting the information for nodeinfo
Index ¶
- func CalculateDiskUsage(directory string) (int64, error)
- func CollectSystemMetrics(params CollectionParams, sleeper func(time.Duration), ...) error
- func GetDiskUsageAllFromPartitions(partitions []disk.PartitionStat) (string, error)
- func HumanReadableSize(size uint64) string
- func RunCollectDiskUsage(c *conf.CollectConf) error
- func RunCollectDiskUsageFromPartitionList(c *conf.CollectConf, partitions []disk.PartitionStat) error
- func SystemMetrics(args Args) error
- type Args
- type CollectionParams
- type SystemMetricsRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateDiskUsage ¶ added in v0.6.0
func CollectSystemMetrics ¶ added in v0.6.0
func GetDiskUsageAllFromPartitions ¶ added in v0.6.0
func GetDiskUsageAllFromPartitions(partitions []disk.PartitionStat) (string, error)
func HumanReadableSize ¶ added in v0.6.0
HumanReadableSize is matching df -h output which tends to be base 2 and not base 10 this will create a disconnect between the vendor disk sizes and what this reports
func RunCollectDiskUsage ¶ added in v0.6.0
func RunCollectDiskUsage(c *conf.CollectConf) error
func RunCollectDiskUsageFromPartitionList ¶ added in v0.6.0
func RunCollectDiskUsageFromPartitionList(c *conf.CollectConf, partitions []disk.PartitionStat) error
RunCollectDiskUsaget collects disk usage information and writes it to files. It takes a pointer to a CollectConf struct (c) It returns an error if any operation fails.
func SystemMetrics ¶
Types ¶
type CollectionParams ¶ added in v0.6.0
type CollectionParams struct { IntervalSeconds int DurationSeconds int RowWriter func(SystemMetricsRow) error }
CollectionParams includes all the necessary parameters to complete a collection
type SystemMetricsRow ¶
type SystemMetricsRow struct { CollectionTimeStamp time.Time `json:"collectionTimestamp"` UserCPUPercent float64 `json:"userCPUPercent"` SystemCPUPercent float64 `json:"systmeCPUPercent"` IdleCPUPercent float64 `json:"idleCPUPercent"` NiceCPUPercent float64 `json:"niceCPUPercent"` IOWaitCPUPercent float64 `json:"ioWaitCPUPercent"` IRQCPUPercent float64 `json:"irqCPUPercent"` SoftIRQCPUPercent float64 `json:"softIRQCPUPercent"` StealCPUPercent float64 `json:"stealCPUPercent"` GuestCPUPercent float64 `json:"guestCPUPercent"` GuestNiceCPUPercent float64 `json:"guestCPUNicePercent"` QueueDepth float64 `json:"queueDepth"` DiskLatency float64 `json:"diskLatency"` ReadBytes int64 `json:"readBytes"` WriteBytes int64 `json:"writeBytes"` FreeRAMMB int64 `json:"freeRAMMB"` CachedRAMMB int64 `json:"cachedRAMMB"` }
SystemMetricsRow represents a row of system metrics data.
Directories
¶
Path | Synopsis |
---|---|
gopsmetrics implements metrics collection using gopsutil
|
gopsmetrics implements metrics collection using gopsutil |
metrics provides the interface to implement metrics
|
metrics provides the interface to implement metrics |
Click to show internal directories.
Click to hide internal directories.