parent
b878028671
commit
94dba3399c
14
rrd.py
14
rrd.py
|
@ -92,11 +92,17 @@ class rrd:
|
||||||
subprocess.check_output(args)
|
subprocess.check_output(args)
|
||||||
|
|
||||||
def createNodeGraph(self,nodePrimaryMAC,displayTimeNode):
|
def createNodeGraph(self,nodePrimaryMAC,displayTimeNode):
|
||||||
nodeGraph = self.nodeMACToPNGFile(nodePrimaryMAC + '_upstate')
|
nodeGraph = self.nodeMACToPNGFile(nodePrimaryMAC)
|
||||||
nodeFile = self.nodeMACToRRDFile(nodePrimaryMAC)
|
nodeFile = self.nodeMACToRRDFile(nodePrimaryMAC)
|
||||||
args = ['rrdtool', 'graph', nodeGraph, '-s', '-' + self.displayTimeNode , '-w', '800', '-h' '400'
|
args = ['rrdtool','graph', nodeGraph, '-s', '-' + self.displayTimeNode , '-w', '800', '-h', '400', '-l', '0', '-y', '1:1',
|
||||||
,'DEF:upstate=' + nodeFile + ':upstate:LAST', 'LINE1:upstate#F00:upstate\\l'
|
'DEF:clients=' + nodeFile + ':clients:LAST',
|
||||||
]
|
'VDEF:maxc=clients,MAXIMUM',
|
||||||
|
'CDEF:c=0,clients,ADDNAN',
|
||||||
|
'CDEF:d=clients,UN,maxc,UN,1,maxc,IF,*',
|
||||||
|
'AREA:c#0F0:up\\l',
|
||||||
|
'AREA:d#F00:down\\l',
|
||||||
|
'LINE1:c#00F:clients connected\\l',
|
||||||
|
]
|
||||||
subprocess.check_output(args)
|
subprocess.check_output(args)
|
||||||
|
|
||||||
def update_database(self,db):
|
def update_database(self,db):
|
||||||
|
|
Loading…
Reference in New Issue