-
Notifications
You must be signed in to change notification settings - Fork 0
/
rrd32.ksy
207 lines (207 loc) · 4.28 KB
/
rrd32.ksy
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
meta:
id: rrd32
title: RRD (Round-Robin Database) file
file-extension: rrd
endian: le
license: CC0-1.0
seq:
- id: header
type: header
- id: ds_store
type: ds_def
repeat: expr
repeat-expr: header.ds_count
- id: rra_store
type: rra_def
repeat: expr
repeat-expr: header.rra_count
- id: live_head
type: live_head
- id: pdp_prep_store
type: pdp_prep
repeat: expr
repeat-expr: header.ds_count
- id: cdp_prep_store
type:
switch-on: rra_store[_index].cf
cases:
'"MHWPREDICT"': unknown_cdp_prep
'"HWPREDICT"': unknown_cdp_prep
'"SEASONAL"': unknown_cdp_prep
'"DEVSEASONAL"': unknown_cdp_prep
'"FAILURES"': unknown_cdp_prep
'"DEVPREDICT"': unknown_cdp_prep
_: cdp_prep
repeat: expr
repeat-expr: header.rra_count
- id: rra_ptr_store
type: u4
repeat: expr
repeat-expr: header.rra_count
- id: rra_data_store
type: rra_data(rra_store[_index].row_count)
repeat: expr
repeat-expr: header.rra_count
types:
header:
seq:
- id: magic
contents: ['RRD', 0]
- id: version
type: str
size: 4
encoding: ascii
- id: padding
size: 8
- id: floatcookie
type: f8
- id: ds_count
type: u4
- id: rra_count
type: u4
- id: pdp_step
type: u4
- doc: "padding"
size: 4
- id: params
doc: "unused"
size: 8
repeat: expr
repeat-expr: 10
ds_def:
seq:
- id: name
type: str
size: 20
encoding: ascii
terminator: 0
- id: datasource
type: str
size: 20
encoding: ascii
terminator: 0
- id: params
type: ds_params
ds_params:
seq:
- id: min_heartbeat_count
type: u4
- id: min_val
type: f8
- id: max_val
type: f8
- id: cdef
doc: "pointer to encoded rpn expression only applies to DST_CDEF, not supported here"
type: u4
- id: unused
size: 8
repeat: expr
repeat-expr: 10 - 3
rra_def:
seq:
- id: cf
type: str
size: 20
encoding: ascii
terminator: 0
- id: row_count
type: u4
- id: pdp_count
type: u4
- doc: "padding"
size: 4
- id: params
type:
switch-on: cf
cases:
'"MHWPREDICT"': unknown_params
'"HWPREDICT"': unknown_params
'"SEASONAL"': unknown_params
'"DEVSEASONAL"': unknown_params
'"FAILURES"': unknown_params
'"DEVPREDICT"': unknown_params
_: rra_params
rra_params:
seq:
- id: xff
type: f8
- id: unused
size: 8
repeat: expr
repeat-expr: 10 - 1
unknown_params:
seq:
- id: params
size: 8
repeat: expr
repeat-expr: 10
live_head:
seq:
- id: last_update
type: u4
- id: last_update_usec
type: u4
pdp_prep:
seq:
- id: last_ds_reading
type: str
size: 32
encoding: ascii
terminator: 0
- id: params
type: pdp_prep_params
pdp_prep_params:
seq:
- id: unknown_sec_count
type: u4
- doc: "padding"
size: 4
- id: current_value
type: f8
- id: unused
size: 8
repeat: expr
repeat-expr: 10 - 2
cdp_prep:
seq:
- id: params
type: cdp_prep_params
repeat: expr
repeat-expr: _root.header.ds_count
cdp_prep_params:
seq:
- id: value
type: f8
- id: unknown_pdp_count
type: u4
- id: unused
size: 8
repeat: expr
repeat-expr: 10 - 4
- doc: "padding"
size: 4
- id: primary_value
type: f8
- id: secondary_value
type: f8
unknown_cdp_prep:
seq:
- id: unused
size: 8
repeat: expr
repeat-expr: 10
rra_data:
params:
- id: row_count
type: u4
seq:
- id: row
type: rra_data_row
repeat: expr
repeat-expr: row_count
rra_data_row:
seq:
- id: values
type: f8
repeat: expr
repeat-expr: _root.header.ds_count