Ejemplo n.º 1
0
def agg_1stLevel_conn(request, logger, cfg, obj):
    conn = ldms_connect(logger, obj['agg_1stLevel_host'], cfg.AGG_XPRT, cfg.AGG_PORT)
    def fin():
        logger.debug("---disconnect {0}:{1}---".format(obj['agg_1stLevel_host'],
                                                       cfg.AGG_PORT))
        ldms.ldms_xprt_close(conn)
    request.addfinalizer(fin)
    return conn
Ejemplo n.º 2
0
def samplerd_conn(request, logger, cfg, obj):
    conn = ldms_connect(logger, obj['samplerd_host'], cfg.SAMPLERD_XPRT,
                        cfg.SAMPLERD_PORT)
    def fin():
        logger.debug("---disconnect {0}:{1}---".format(obj['samplerd_host'],
                                                       cfg.SAMPLERD_PORT))
        ldms.ldms_xprt_close(conn)
    request.addfinalizer(fin)
    return conn