-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructures.go
86 lines (75 loc) · 1.43 KB
/
structures.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package main
type System struct {
Sysstat Sysstat
}
type Sysstat struct {
Hosts []Host
}
type Host struct {
Nodename string
Sysname string
Release string
Machine string
NumberOfCpus int `json:"number-of-cpus"`
FileDate string `json:"file-date"`
FileUtcTime string `json:"file-utc-time"`
Timezone string
Statistics []Statistics
}
type Statistics struct {
Timestamp Timestamp
Cpu []Cpu `json:"cpu-load"`
Memory Memory
Queue Queue
Network Network
}
type Timestamp struct {
Date string
Time string
Utc int
Interval int
}
type Cpu struct {
Cpu string
User float64
Nice float64
System float64
Iowait float64
Steal float64
Idle float64
}
type Memory struct {
Memfree int
Avail int
Memused int
MemusedPct float64 `json:"memused-percent"`
Buffers int
Cached int
Commit int
CommitPct float64 `json:"commit-percent"`
Active int
Inactive int
Dirty int
}
type Queue struct {
RunqSz int `json:"runq-sz"`
PlistSz int `json:"plist-sz"`
Load1 float64 `json:"ldavg-1"`
Load5 float64 `json:"ldavg-5"`
Load15 float64 `json:"ldavg-15"`
Blocked int
}
type Network struct {
NetDev []NetDev `json:"net-dev"`
}
type NetDev struct {
Iface string
Rxpck float64
Txpck float64
Rxkb float64
Txkb float64
Rxcmp float64
Txcmp float64
Rxmcst float64
UtilPct float64 `json:"ifutil-percent"`
}