Versions in this module Expand all Collapse all v0 v0.1.0 Nov 28, 2025 Changes in this version + var ErrEmptyRow = NewProcError("empty row") + var ErrFieldCountMismatch = NewProcError("field count mismatch") + var ErrFileRead = NewProcError("failed to read /proc file") + var ErrInvalidField = func(p []byte) ProcUseError + var ErrInvalidNumber = NewProcError("invalid number") + var ErrLineCountMismatch = NewProcError("line count mismatch") + type LoadAvg struct + LastPID int32 + Load1 float64 + Load15 float64 + Load5 float64 + Running int32 + TotalThreads int32 + func ReadLoadAvg() (LoadAvg, error) + type NetArp struct + Device string + Flags uint16 + HWAddress net.HardwareAddr + HWType uint16 + IPAddr netip.Addr + Mask netip.Prefix + func ReadNetArp() ([]NetArp, error) + type NetDev struct + Interface string + RX NetDevRX + TX NetDevTX + func ReadNetDev() ([]NetDev, error) + type NetDevRX struct + Bytes uint64 + Compressed uint64 + Drop uint64 + Errs uint64 + Fifo uint64 + Frame uint64 + Multicast uint64 + Packets uint64 + type NetDevTX struct + Bytes uint64 + Carrier uint64 + Colls uint64 + Compressed uint64 + Drop uint64 + Errs uint64 + Fifo uint64 + Packets uint64 + type NetProtocol struct + Flags NetProtocolFlags + MaxHdr uint + Memory int + Module string + Press string + Protocol string + Size uint + Slab bool + Sockets int + func ReadNetProtocols() ([]NetProtocol, error) + type NetProtocolFlags struct + AC bool + BI bool + BR bool + CL bool + CO bool + DE bool + DI bool + EM bool + GP bool + GS bool + HA bool + IN bool + IO bool + RE bool + SE bool + SH bool + SS bool + UH bool + type ProcUseError struct + func NewProcError(msg string) ProcUseError + func (p ProcUseError) Error() string + func (p ProcUseError) Unwrap() error + func (p ProcUseError) Wrap(err error) ProcUseError + type Process struct + Class string + Command string + Cpu float64 + FullCommand string + Memory float64 + PID int32 + PPID int32 + State string + User string + type SelfStatus struct + CapAmbMask uint64 + CapBndMask uint64 + CapEffMask uint64 + CapInhMask uint64 + CapPrmMask uint64 + CoreDumping uint32 + CpusAllowedList string + CpusAllowedMaskVec []uint8 + FDSize uint32 + Gid []uint16 + Groups []uint16 + HugetlbPages uint64 + Kthread uint64 + MemsAllowed []string + MemsAllowedList string + NSpgid int64 + NSpid int64 + NSsid int64 + NStgid int64 + Name string + Ngid int64 + NoNewPrivs int64 + NonvoluntaryCtxtSwitches uint64 + PPid int32 + Pid int32 + RssAnon uint64 + RssFile uint64 + RssShmem uint64 + Seccomp uint64 + SeccompFilters uint64 + ShdPnd uint64 + SigBlk uint64 + SigCgt uint64 + SigIgn uint64 + SigPnd uint64 + SigQ string + SpeculationIndirectBranch string + SpeculationStoreBypass string + State string + THPEnabled uint64 + Tgid uint64 + Threads uint64 + TracerPid int32 + Uid []uint16 + UntagMask uint64 + VmData uint64 + VmExe uint64 + VmHWM uint64 + VmLck uint64 + VmLib uint64 + VmPTE uint64 + VmPeak uint64 + VmPin uint64 + VmRSS uint64 + VmSize uint64 + VmStk uint64 + VmSwap uint64 + VoluntaryCtxtSwitches uint64 + X86ThreadFeatures []string + X86ThreadFeaturesLocked []string + type Uptime struct + IdleTime time.Duration + Uptime time.Duration + func ReadUptime() (Uptime, error) + type VmStat map[string]uint64 + func ReadVmStat() (VmStat, error)