Documentation
¶
Overview ¶
Package procmon is a simple library for recording samples of a process and sending the results to datadog.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Measure ¶
type Measure struct {
// User is the number of usermode CPU jiffies used
User uint64
// System is the number of kernelmode CPU jiffies used
System uint64
// UserTotal is the number of usermode CPU jiffies used across all processes
UserTotal uint64
// SystemTotal is the number of kernelmode CPU jiffies used across all processes
SystemTotal uint64
// IdleTotal is the number of CPU jiffies spent in the idle task.
IdleTotal uint64
// Memory is the amount of memory used in kB
Memory uint64
}
Measure is a point in time measure of a process's resource consumption.
func (*Measure) SysInECU ¶
SysInECU calculates the amount of CPU time spent in the kernel, as measured in ECUs, for the monitored process assuming it is running on a machine of type `instance`.
func (*Measure) SysPerc ¶
SysPerc calculates the percentage of CPU time spent in the kernel by the monitored process.
type Monitor ¶
type Monitor struct {
Output chan<- Measure
// contains filtered or unexported fields
}
Monitor represents a continuous monitoring of a given Linux process.
Click to show internal directories.
Click to hide internal directories.