Beispiel #1
0
def plugin_decoder_agent(app, db, data):
    if data is None or len(data) <= 0:
        logger.debug('invalid data:%s' % (data))
        return
        
    print "-"*30, "vminfo", "-" * 30
    pass_time = time.time()
    plugin_agent_srv.plugin_decoder_agent(tool, db, data)
    print 'spend \033[1;33m%f\033[0m seconds' % (time.time() - pass_time)
Beispiel #2
0
def plugin_decoder_agent(app, db, data):
    """ data:'{"*****@*****.**":
        [
         ["cpu", "total", [1332831360.029795, 53522870000000]],
         ["mem", "total", [1332831360.029795, 131072, 131072]],
         ["nic", "vnet0", [1332831360.037399, 21795245, 5775663]],
         ["blk", "vda", [1332831360.04699, 474624, 4851712]],
         ["blk", "vdb", [1332831360.049333, 122880, 0]]
        ]
     }'
    """
    if data is None or len(data) <= 0:
        logger.debug("invalid data:%s" % (data))
        return

    print "-" * 30, "vminfo", "-" * 30
    pass_time = time.time()
    plugin_agent_srv.plugin_decoder_agent(tool, db, data)
    print "spend \033[1;33m%f\033[0m seconds" % (time.time() - pass_time)
Beispiel #3
0
def plugin_decoder_agent(app, db, data):
    """ data:'{"*****@*****.**":
        [
         ["cpu", "total", [1332831360.029795, 53522870000000]],
         ["mem", "total", [1332831360.029795, 131072, 131072]],
         ["nic", "vnet0", [1332831360.037399, 21795245, 5775663]],
         ["blk", "vda", [1332831360.04699, 474624, 4851712]],
         ["blk", "vdb", [1332831360.049333, 122880, 0]]
        ]
     }'
    """
    if data is None or len(data) <= 0:
        logger.debug('invalid data:%s' % (data))
        return

    print "-" * 30, "vminfo", "-" * 30
    pass_time = time.time()
    plugin_agent_srv.plugin_decoder_agent(tool, db, data)
    print 'spend \033[1;33m%f\033[0m seconds' % (time.time() - pass_time)