Documentation
¶
Overview ¶
Package stats provides statistic utilities for Plan 9.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUTime ¶
type CPUTime struct {
User time.Duration // the time in user mode (millisecconds)
Sys time.Duration
Real time.Duration
ChildUser time.Duration // exited children and descendants time in user mode
ChildSys time.Duration
ChildReal time.Duration
}
CPUTime represents /dev/cputime or a part of /proc/n/status.
type IPStats ¶
type IPStats struct {
ID int // number of interface in ipifc dir
Device string // associated physical device
MTU int // max transfer unit
Sendra6 uint8 // on == send router adv
Recvra6 uint8 // on == recv router adv
Pktin int64 // packets read
Pktout int64 // packets written
Errin int64 // read errors
Errout int64 // write errors
}
type InterfaceStats ¶
type InterfaceStats struct {
PacketsReceived int64 // in packets
Link int // link status
PacketsSent int64 // out packets
NumCRCErr int // input CRC errors
NumOverflows int // packet overflows
NumSoftOverflows int // software overflow
NumFramingErr int // framing errors
NumBufferingErr int // buffering errors
NumOutputErr int // output errors
Promiscuous int // number of promiscuous opens
Mbps int // megabits per sec
Addr string
}
func ReadInterfaceStats ¶
func ReadInterfaceStats(ctx context.Context, opts ...Option) (*InterfaceStats, error)
type MemStats ¶
type MemStats struct {
Total int64 // total memory in byte
PageSize int64 // a page size in byte
KernelPages int64
UserPages Gauge
SwapPages Gauge
Malloced Gauge // kernel malloced data in byte
Graphics Gauge // kernel graphics data in byte
}
MemStats represents the memory statistics.
type ProcStatus ¶
type ProcStatus struct {
Name string
User string
State string
Times CPUTime
MemUsed int64 // in units of 1024 bytes
BasePriority uint32 // 0(low) to 19(high)
Priority uint32 // 0(low) to 19(high)
}
ProcStatus represents a /proc/n/status.
type SysStats ¶
Click to show internal directories.
Click to hide internal directories.