summaryrefslogtreecommitdiffstats
path: root/meta-facebook/meta-wedge/recipes-wedge/rackmon/rackmon/rackmon-config.py
blob: 130f26f622a8560e1f67d6df7e256140b6e34899 (plain)
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
208
209
210
211
212
213
214
215
216
217
218
219
220
from rackmond import configure_rackmond

reglist = [
    {"begin": 0x0, #MFR_MODEL
     "length": 8},
    {"begin": 0x10, #MFR_DATE
     "length": 8},
    {"begin": 0x20, #FB Part #
     "length": 8},
    {"begin": 0x30, #HW Revision
     "length": 4},
    {"begin": 0x38, #FW Revision
     "length": 4},
    {"begin": 0x40, #MFR Serial #
     "length": 16},
    {"begin": 0x60, #Workorder #
     "length": 4},
    {"begin": 0x68, #PSU Status
     "length": 1,
     "keep": 10,   # 10-sample ring buffer
     "flags": 1},
    {"begin": 0x69, #Battery Status
     "length": 1,
     "keep": 10,   # 10-sample ring buffer
     "flags": 1},
    {"begin": 0x6B, #BBU Battery Mode
     "length": 1,
     "keep": 10,   # 10-sample ring buffer
     "flags": 1},
    {"begin": 0x6C, #BBU Battery Status
     "length": 1,
     "keep": 10,   # 10-sample ring buffer
     "flags": 1},
    {"begin": 0x6D, #BBU Cell Voltage 1
     "length": 1,
     "keep": 10},
    {"begin": 0x6E, #BBU Cell Voltage 2
     "length": 1,
     "keep": 10},
    {"begin": 0x6F, #BBU Cell Voltage 3
     "length": 1,
     "keep": 10},
    {"begin": 0x70, #BBU Cell Voltage 4
     "length": 1,
     "keep": 10},
    {"begin": 0x71, #BBU Cell Voltage 5
     "length": 1,
     "keep": 10},
    {"begin": 0x72, #BBU Cell Voltage 6
     "length": 1,
     "keep": 10},
    {"begin": 0x73, #BBU Cell Voltage 7
     "length": 1,
     "keep": 10},
    {"begin": 0x74, #BBU Cell Voltage 8
     "length": 1,
     "keep": 10},
    {"begin": 0x75, #BBU Cell Voltage 9
     "length": 1,
     "keep": 10},
    {"begin": 0x76, #BBU Cell Voltage 10
     "length": 1,
     "keep": 10},
    {"begin": 0x77, #BBU Cell Voltage 11
     "length": 1,
     "keep": 10},
    {"begin": 0x78, #BBU Cell Voltage 12
     "length": 1,
     "keep": 10},
    {"begin": 0x79, #BBU Cell Voltage 13
     "length": 1,
     "keep": 10},
    {"begin": 0x7A, #BBU Temp 1
     "length": 1,
     "keep": 10},
    {"begin": 0x7B, #BBU Temp 2
     "length": 1,
     "keep": 10},
    {"begin": 0x7C, #BBU Temp 3
     "length": 1,
     "keep": 10},
    {"begin": 0x7D, #BBU Temp 4
     "length": 1,
     "keep": 10},
    {"begin": 0x7E, #BBU Relative State of Charge
     "length": 1,
     "keep": 10},
    {"begin": 0x7F, #BBU Absolute State of Charge
     "length": 1,
     "keep": 10},
    {"begin": 0x80, #Input VAC
     "length": 1,
     "keep": 10},
    {"begin": 0x81, #BBU Battery Voltage
     "length": 1,
     "keep": 10},
    {"begin": 0x82, #Input Current AC
     "length": 1,
     "keep": 10},
    {"begin": 0x83, #BBU Battery Current
     "length": 1,
     "keep": 10},
    {"begin": 0x84, #Battery Voltage
     "length": 1,
     "keep": 10},
    {"begin": 0x85, #BBU Average Current
     "length": 1,
     "keep": 10},
    {"begin": 0x86, #Battery Current Output
     "length": 1},
    {"begin": 0x87, #BBU Remaining Capacity
     "length": 1,
     "keep": 10},
    {"begin": 0x88, #Battery Current Input
     "length": 1},
    {"begin": 0x89, #BBU Full Charge Capacity
     "length": 1,
     "keep": 10},
    {"begin": 0x8A, #Output Voltage (main converter)
     "length": 1,
     "keep": 10},
    {"begin": 0x8B, #BBU Run Time to Empty
     "length": 1,
     "keep": 10},
    {"begin": 0x8C, #Output Current (main converter)
     "length": 1,
     "keep": 10},
    {"begin": 0x8D, #BBU Average Time to Empty
     "length": 1,
     "keep": 10},
    {"begin": 0x8E, #IT Load Voltage Output
     "length": 1},
    {"begin": 0x8F, #BBU Charging Current
     "length": 1},
    {"begin": 0x90, #IT Load Current Output
     "length": 1},
    {"begin": 0x91, #BBU Charging Voltage
     "length": 1,
     "keep": 10},
    {"begin": 0x92, #Bulk Cap Voltage
     "length": 1},
    {"begin": 0x93, #BBU Cycle Count
     "length": 1,
     "keep": 10},
    {"begin": 0x94, #Input Power
     "length": 1,
     "keep": 10},
    {"begin": 0x95, #BBU Design Capacity
     "length": 1},
    {"begin": 0x96, #Output Power
     "length": 1,
     "keep": 10},
    {"begin": 0x97, #BBU Design Voltage
     "length": 1},
    {"begin": 0x98, #RPM Fan 0
     "length": 1},
    {"begin": 0x99, #BBU At Rate
     "length": 1},
    {"begin": 0x9A, #RPM Fan 1
     "length": 1},
    {"begin": 0x9B, #BBU At Rate Time to Full
     "length": 1,
     "keep": 10},
    {"begin": 0x9C, #BBU At Rate Time to Empty
     "length": 1,
     "keep": 10},
    {"begin": 0x9D, #BBU At Rate OK
     "length": 1,
     "keep": 10},
    {"begin": 0x9E, #Temp 0
     "length": 1},
    {"begin": 0x9F, #BBU Temp
     "length": 1},
    {"begin": 0xA0, #Temp 1
     "length": 1},
    {"begin": 0xA1, #BBU Max Error
     "length": 1},
    {"begin": 0xD0, #General Alarm Status Register
     "length": 1},
    {"begin": 0xD1, #PFC Alarm Status Register
     "length": 1},
    {"begin": 0xD2, #LLC Alarm Status Register
     "length": 1},
    {"begin": 0xD3, #Current Feed Alarm Status Register
     "length": 1},
    {"begin": 0xD4, #Auxiliary Alarm Status Register
     "length": 1},
    {"begin": 0xD5, #Battery Charger Alarm Status Register
     "length": 1},
    {"begin": 0xD7, #Temperature Alarm Status Register
     "length": 1},
    {"begin": 0xD8, #Fan Alarm Status Register
     "length": 1},
    {"begin": 0xD9, #Communication Alarm Status Register
     "length": 1},
    {"begin": 0x106, #BBU Specification Info
     "length": 1},
    {"begin": 0x107, #BBU Manufacturer Date
     "length": 1},
    {"begin": 0x108, #BBU Serial Number
     "length": 1},
    {"begin": 0x109, #BBU Device Chemistry
     "length": 2},
    {"begin": 0x10B, #BBU Manufacturer Data
     "length": 2},
    {"begin": 0x10D, #BBU Manufacturer Name
     "length": 8},
    {"begin": 0x115, #BBU Device Name
     "length": 8},
    {"begin": 0x11D, #FB Battery Status
     "length": 4},
    {"begin": 0x121, #SoH results
     "length": 1},
]

def main():
    configure_rackmond(reglist)

if __name__ == "__main__":
    main()
OpenPOWER on IntegriCloud