Documentation
¶
Overview ¶
Package resources measures what agents cost the machine: every process attributed to a session, to a session that has ended, or to whatever else runs on the box.
Index ¶
Constants ¶
const ( KindSession = "session" KindLeft = "left" KindOutside = "outside" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
Key string `json:"key"`
SessionID string `json:"sessionId,omitempty"`
Kind string `json:"kind"`
Title string `json:"title"`
Detail string `json:"detail,omitempty"`
CPU float64 `json:"cpu"`
Mem int64 `json:"mem"`
Read float64 `json:"read"`
Write float64 `json:"write"`
Count int `json:"count"`
RSSOnly bool `json:"rssOnly,omitempty"`
Procs []Process `json:"procs,omitempty"`
}
type Load ¶
Load is what a session row carries, only while it is heavy and rounded, so an ordinary fluctuation does not re-send the whole session list.
type Machine ¶
type Machine struct {
Cores int `json:"cores"`
CPU float64 `json:"cpu"`
MemTotal int64 `json:"memTotal"`
MemUsed int64 `json:"memUsed"`
SwapTotal int64 `json:"swapTotal"`
SwapUsed int64 `json:"swapUsed"`
Load float64 `json:"load"`
Pressure float64 `json:"pressure"`
RAMDisk int64 `json:"ramDisk,omitempty"`
Read float64 `json:"read"`
Write float64 `json:"write"`
Disks []Disk `json:"disks,omitempty"`
}
type Report ¶
type Report struct {
At time.Time `json:"at"`
Machine Machine `json:"machine"`
Sessions []Group `json:"sessions"`
Left []Group `json:"left"`
Outside []Group `json:"outside"`
Rest Group `json:"rest"`
Disk []DiskUse `json:"disk,omitempty"`
DiskAt time.Time `json:"diskAt,omitzero"`
RAMDirs []DiskUse `json:"ramDirs,omitempty"`
Exact bool `json:"exact"`
Cost float64 `json:"cost"`
}