comparison adslstats.py @ 19:5bec78c876db

Properly re-arrange signal graph entries, show power.
author Daniel O'Connor <darius@dons.net.au>
date Mon, 23 May 2016 11:52:50 +0930
parents ec994073f70a
children 38e3804d4f80
comparison
equal deleted inserted replaced
18:ec994073f70a 19:5bec78c876db
217 signalargs = ( 217 signalargs = (
218 '-a', 'SVG', 218 '-a', 'SVG',
219 '--vertical-label', 'dB', 219 '--vertical-label', 'dB',
220 '--slope-mode', 220 '--slope-mode',
221 '-l', '0', 221 '-l', '0',
222 222 '--font', 'LEGEND:7',
223 'DEF:nmup_=%s:nmup:AVERAGE' % rrdname, 223
224 'DEF:nmupmin_=%s:nmup:MIN' % rrdname, 224 'DEF:nmup=%s:nmup:AVERAGE' % rrdname,
225 'DEF:nmupmax_=%s:nmup:MAX' % rrdname, 225 'DEF:nmupmin=%s:nmup:MIN' % rrdname,
226 226 'DEF:nmupmax=%s:nmup:MAX' % rrdname,
227 'CDEF:nmup=nmup_,10,*', 227
228 'CDEF:nmupmin=nmupmin_,10,*',
229 'CDEF:nmupmax=nmupmax_,10,*',
230 'CDEF:nmupdif=nmupmax,nmupmin,-', 228 'CDEF:nmupdif=nmupmax,nmupmin,-',
231 229
232 'LINE0:nmupmin#000000:', 230 'LINE0:nmupmin#000000:',
233 'AREA:nmupdif#5c5cff::STACK', 231 'AREA:nmupdif#5c5cff::STACK',
234 'LINE1:nmup#0000ff:Noise Margin - Up (1/10 dB)', 232 'LINE1:nmup#0000ff:Noise Margin - Up',
235 233
236 'DEF:nmdown_=%s:nmdown:AVERAGE' % rrdname, 234 'DEF:nmdown=%s:nmdown:AVERAGE' % rrdname,
237 'DEF:nmdownmin_=%s:nmdown:MIN' % rrdname, 235 'DEF:nmdownmin=%s:nmdown:MIN' % rrdname,
238 'DEF:nmdownmax_=%s:nmdown:MAX' % rrdname, 236 'DEF:nmdownmax=%s:nmdown:MAX' % rrdname,
239 237
240 'CDEF:nmdown=nmdown_,10,*',
241 'CDEF:nmdownmin=nmdownmin_,10,*',
242 'CDEF:nmdownmax=nmdownmax_,10,*',
243 'CDEF:nmdowndif=nmdownmax,nmdownmin,-', 238 'CDEF:nmdowndif=nmdownmax,nmdownmin,-',
239
240 'LINE0:nmdownmin#000000:',
241 'AREA:nmdowndif#009a00::STACK',
242 'LINE1:nmdown#00ff00:Noise Margin - Down',
244 243
245 'DEF:attenup=%s:attenup:AVERAGE' % rrdname, 244 'DEF:attenup=%s:attenup:AVERAGE' % rrdname,
246 'DEF:attenupmin=%s:attenup:MIN' % rrdname, 245 'DEF:attenupmin=%s:attenup:MIN' % rrdname,
247 'DEF:attenupmax=%s:attenup:MAX' % rrdname, 246 'DEF:attenupmax=%s:attenup:MAX' % rrdname,
248 247
249 'CDEF:attenupdif=attenupmax,attenupmin,-', 248 'CDEF:attenupdif=attenupmax,attenupmin,-',
250 249
250 'LINE0:attenupmin#000000:',
251 'AREA:attenupdif#f98100::STACK',
252 'LINE1:attenup#ff0000:Attenuation - Up',
253
251 'DEF:attendown=%s:attendown:AVERAGE' % rrdname, 254 'DEF:attendown=%s:attendown:AVERAGE' % rrdname,
252 'DEF:attendownmin=%s:attendown:MIN' % rrdname, 255 'DEF:attendownmin=%s:attendown:MIN' % rrdname,
253 'DEF:attendownmax=%s:attendown:MAX' % rrdname, 256 'DEF:attendownmax=%s:attendown:MAX' % rrdname,
254 257
255 'CDEF:attendowndif=attendownmax,attendownmin,-', 258 'CDEF:attendowndif=attendownmax,attendownmin,-',
256 259
257 'DEF:powerup_=%s:powerup:AVERAGE' % rrdname,
258 'DEF:powerupmin_=%s:powerup:MIN' % rrdname,
259 'DEF:powerupmax_=%s:powerup:MAX' % rrdname,
260
261 'DEF:powerdown_=%s:powerdown:AVERAGE' % rrdname,
262 'DEF:powerdownmin_=%s:powerdown:MIN' % rrdname,
263 'DEF:powerdownmax_=%s:powerdown:MAX' % rrdname,
264
265
266 'LINE0:nmdownmin#000000:',
267 'AREA:nmdowndif#009a00::STACK',
268 'LINE1:nmdown#00ff00:Noise Margin - Down (1/10 dB)',
269
270 'LINE0:attenupmin#000000:',
271 'AREA:attenupdif#f98100::STACK',
272 'LINE1:attenup#ff0000:Attenuation - Up',
273
274 'LINE0:attendownmin#000000:', 260 'LINE0:attendownmin#000000:',
275 'AREA:attendowndif#aaaaaa::STACK', 261 'AREA:attendowndif#aaaaaa::STACK',
276 'LINE1:attendown#000000:Attenuation - Down') 262 'LINE1:attendown#000000:Attenuation - Down',
263
264 'DEF:powerup=%s:powerup:AVERAGE' % rrdname,
265 'DEF:powerupmin=%s:powerup:MIN' % rrdname,
266 'DEF:powerupmax=%s:powerup:MAX' % rrdname,
267
268 'CDEF:powerupdif=powerupmax,powerupmin,-',
269
270 'LINE0:powerupmin#000000:',
271 'AREA:powerupdif#804007::STACK',
272 'LINE1:powerup#ff800e:Power - Up (dBm)',
273
274 'DEF:powerdown=%s:powerdown:AVERAGE' % rrdname,
275 'DEF:powerdownmin=%s:powerdown:MIN' % rrdname,
276 'DEF:powerdownmax=%s:powerdown:MAX' % rrdname,
277
278 'CDEF:powerdowndif=powerdownmax,powerdownmin,-',
279
280 'LINE0:powerdownmin#000000:',
281 'AREA:powerdowndif#604872::STACK',
282 'LINE1:powerdown#c090e5:Power - Down (dBm)',
283 )
277 284
278 rrdtool.graph("%s-hour-link.svg" % (graphbasename), 285 rrdtool.graph("%s-hour-link.svg" % (graphbasename),
279 '--width', '768', 286 '--width', '768',
280 '--height', '256', 287 '--height', '256',
281 '--start', 'end - 7d', 288 '--start', 'end - 7d',