Documentation
¶
Overview ¶
Package os queries the host OS information (e.g., kernel version).
Index ¶
- Constants
- func HasVFSFileMaxLimitReached(line string) bool
- func Match(line string) (eventName string, message string)
- func New(gpudInstance *components.GPUdInstance) (components.Component, error)
- type FileDescriptors
- type Host
- type Kernel
- type KernelPanicInstance
- type MachineMetadata
- type Platform
- type Uptimes
Constants ¶
View Source
const ( // DefaultMaxAllocatedFileHandles is some high number, in case the system is under high file descriptor usage. DefaultMaxAllocatedFileHandles = 10000000 // DefaultMaxRunningPIDs is some high number, in case fd-max is unlimited DefaultMaxRunningPIDs = 900000 )
View Source
const Name = "os"
Name is the ID of the OS component.
Variables ¶
This section is empty.
Functions ¶
func HasVFSFileMaxLimitReached ¶ added in v0.5.0
Returns true if the line indicates that the file-max limit has been reached. ref. https://docs.kernel.org/admin-guide/sysctl/fs.html#file-max-file-nr
func New ¶
func New(gpudInstance *components.GPUdInstance) (components.Component, error)
Types ¶
type FileDescriptors ¶ added in v0.5.0
type FileDescriptors struct {
// The number of file descriptors currently allocated on the host (not per process).
AllocatedFileHandles uint64 `json:"allocated_file_handles"`
// The number of running PIDs returned by https://pkg.go.dev/github.com/shirou/gopsutil/v4/process#Pids.
RunningPIDs uint64 `json:"running_pids"`
Usage uint64 `json:"usage"`
Limit uint64 `json:"limit"`
// AllocatedFileHandlesPercent is the percentage of file descriptors that are currently allocated,
// based on the current file descriptor limit and the current number of file descriptors allocated on the host (not per process).
AllocatedFileHandlesPercent string `json:"allocated_file_handles_percent"`
// UsedPercent is the percentage of file descriptors that are currently in use,
// based on the current file descriptor limit on the host (not per process).
UsedPercent string `json:"used_percent"`
ThresholdAllocatedFileHandles uint64 `json:"threshold_allocated_file_handles"`
ThresholdAllocatedFileHandlesPercent string `json:"threshold_allocated_file_handles_percent"`
ThresholdRunningPIDs uint64 `json:"threshold_running_pids"`
ThresholdRunningPIDsPercent string `json:"threshold_running_pids_percent"`
// Set to true if the file handles are supported.
FileHandlesSupported bool `json:"file_handles_supported"`
// Set to true if the file descriptor limit is supported.
FDLimitSupported bool `json:"fd_limit_supported"`
}
FileDescriptors represents the file descriptors of the host.
type KernelPanicInstance ¶ added in v0.6.0
type KernelPanicInstance struct {
// Process ID from the CPU line
PID int
// CPU number where the panic occurred
CPU int
// Process name (e.g., "khungtaskd")
ProcessName string
}
KernelPanicInstance contains information related to a kernel panic event
func (*KernelPanicInstance) Summary ¶ added in v0.6.0
func (k *KernelPanicInstance) Summary() string
type MachineMetadata ¶ added in v0.3.5
Click to show internal directories.
Click to hide internal directories.