Esempio n. 1
0
def Dispatch(req, method, args):
    # Default configuration
    defcfg = {
        'xmlrpc_server': {
            'datadir': '/var/lib/rteval',
            'db_server': 'localhost',
            'db_port': 5432,
            'database': 'rteval',
            'db_username': '******',
            'db_password': '******'
        }
    }

    # Fetch configuration
    cfg = rtevalConfig(defcfg)
    cfg.Load(append=True)

    # Prepare an object for executing the query
    xmlrpc = XMLRPC_API1(config=cfg.GetSection('xmlrpc_server'))

    # Exectute it
    result = xmlrpc.Dispatch(method, args)

    # Send the result
    if type(result) == tuple:
        req.write(dumps(result, None, methodresponse=1))
    else:
        req.write(dumps((result, ), None, methodresponse=1))
Esempio n. 2
0
def Dispatch(req, method, args):
    # Default configuration
    defcfg = {'xmlrpc_server': { 'datadir':     '/var/lib/rteval',
                                 'db_server':   'localhost',
                                 'db_port':     5432,
                                 'database':    'rteval',
                                 'db_username': '******',
                                 'db_password': '******'
                                 }
              }

    # Fetch configuration
    cfg = rtevalConfig(defcfg)
    cfg.Load(append=True)

    # Prepare an object for executing the query
    xmlrpc = XMLRPC_API1(config=cfg.GetSection('xmlrpc_server'))

    # Exectute it
    result = xmlrpc.Dispatch(method, args)

    # Send the result
    if type(result) == types.TupleType:
        req.write(dumps(result, None, methodresponse=1))
    else:
        req.write(dumps((result,), None, methodresponse=1))
Esempio n. 3
0
            "metavar": "USEC"
        }
    }


def create(params, logger):
    return Cyclictest(params, logger)


if __name__ == '__main__':
    from rteval.rtevalConfig import rtevalConfig

    l = Log()
    l.SetLogVerbosity(Log.INFO | Log.DEBUG | Log.ERR | Log.WARN)

    cfg = rtevalConfig({}, logger=l)
    prms = {}
    modprms = ModuleParameters()
    for c, p in list(modprms.items()):
        prms[c] = p['default']
    cfg.AppendConfig('cyclictest', prms)

    cfg_ct = cfg.GetSection('cyclictest')
    cfg_ct.reportdir = "."
    cfg_ct.buckets = 200
    # cfg_ct.breaktrace = 30

    runtime = 10

    c = Cyclictest(cfg_ct, l)
    c._WorkloadSetup()
Esempio n. 4
0
                           "metavar": "USEC"}
            }



def create(params, logger):
    return Cyclictest(params, logger)


if __name__ == '__main__':
    from rteval.rtevalConfig import rtevalConfig
    
    l = Log()
    l.SetLogVerbosity(Log.INFO|Log.DEBUG|Log.ERR|Log.WARN)

    cfg = rtevalConfig({}, logger=l)
    prms = {}
    modprms = ModuleParameters()
    for c, p in modprms.items():
        prms[c] = p['default']
    cfg.AppendConfig('cyclictest', prms)

    cfg_ct = cfg.GetSection('cyclictest')
    cfg_ct.reportdir = "."
    cfg_ct.buckets = 200
    # cfg_ct.breaktrace = 30

    runtime = 10

    c = Cyclictest(cfg_ct, l)
    c._WorkloadSetup()
Esempio n. 5
0
        report_n.addChild(KernelInfo.MakeReport(self))
        report_n.addChild(NetworkInfo.MakeReport(self))
        report_n.addChild(SystemServices.MakeReport(self))
        report_n.addChild(CPUtopology.MakeReport(self))
        report_n.addChild(MemoryInfo.MakeReport(self))
        report_n.addChild(dmi.DMIinfo.MakeReport(self))
        report_n.addChild(cmdlineInfo.MakeReport(self))

        return report_n


if __name__ == "__main__":
    from rteval.rtevalConfig import rtevalConfig
    l = Log()
    l.SetLogVerbosity(Log.INFO | Log.DEBUG)
    cfg = rtevalConfig(logger=l)
    cfg.Load("../rteval.conf")
    cfg.installdir = "."
    si = SystemInfo(cfg, logger=l)

    print("\tRunning on %s" % si.get_base_os())
    print("\tNUMA nodes: %d" % si.mem_get_numa_nodes())
    print("\tMemory available: %03.2f %s\n" % si.mem_get_size())

    print("\tServices: ")
    for (s, r) in list(si.services_get().items()):
        print("\t\t%s: %s" % (s, r))
    (curr, avail) = si.kernel_get_clocksources()

    print("\tCurrent clocksource: %s" % curr)
    print("\tAvailable clocksources: %s" % avail)