Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProcStatPath = "/proc/stat" ProcUptimePath = "/proc/uptime" ProcNetDevPath = "/proc/net/dev" ProcPath = "/proc" PidLimitsPathFormat = "/%d/limits" PidFdPathFormat = "/%d/fd" PidTaskPathFormat = "/%d/task" )
Variables ¶
This section is empty.
Functions ¶
func GetPidList ¶
func SearchProcsForEnvVariable ¶
SearchProcsForEnvVariable returns values of the given env variable name it returns a slice since a value could be found in more than one process
Types ¶
type CPUData ¶
type CPUData struct { TotalUserTimeMs float64 TotalSystemTimeMs float64 TotalIdleTimeMs float64 // Maps CPU core name (e.g. "cpu1") to time in ms that the CPU spent in the idle process IndividualCPUIdleTimes map[string]float64 }
func GetCPUData ¶
GetCPUData collects aggregated and per-core CPU usage data
type FileDescriptorMaxData ¶
type FileDescriptorMaxData struct {
MaximumFileHandles float64
}
func GetFileDescriptorMaxData ¶
func GetFileDescriptorMaxData(pids []int) (*FileDescriptorMaxData, error)
GetFileDescriptorMaxData returns the maximum limit of file descriptors the function can use
type FileDescriptorUseData ¶
type FileDescriptorUseData struct {
UseFileHandles float64
}
func GetFileDescriptorUseData ¶
func GetFileDescriptorUseData(pids []int) (*FileDescriptorUseData, error)
GetFileDescriptorUseData returns the maximum number of file descriptors the function has used at a time
type NetworkData ¶
func GetNetworkData ¶
func GetNetworkData() (*NetworkData, error)
GetNetworkData collects bytes sent and received by the function
type ThreadsMaxData ¶
type ThreadsMaxData struct {
ThreadsMax float64
}
func GetThreadsMaxData ¶
func GetThreadsMaxData(pids []int) (*ThreadsMaxData, error)
GetThreadsMaxData returns the maximum limit of threads the function can use
type ThreadsUseData ¶
type ThreadsUseData struct {
ThreadsUse float64
}
func GetThreadsUseData ¶
func GetThreadsUseData(pids []int) (*ThreadsUseData, error)
GetThreadsUseData returns the maximum number of threads the function has used at a time
Click to show internal directories.
Click to hide internal directories.