eris/eris.py
def parse_arguments():
    """ agent command line arguments parse function """

    parser = ArgumentParser(description='eris agent monitor\
                            container CPU utilization and platform\
                            metrics, detect potential resource\
                            contention and regulate \
                            task resource usages')
    parser.add_argument('workload_conf_file', help='workload configuration\
                        file describes each task name, type, id, request cpu\
                        count', type=FileType('rt'), default='wl.csv')
    parser.add_argument('-v', '--verbose', help='increase output verbosity',
                        action='store_true')
    parser.add_argument('-g', '--collect-metrics', help='collect platform\
                        performance metrics (CPI, MPKI, etc..)',
                        action='store_true')
    parser.add_argument('-d', '--detect', help='detect resource contention\
                        between containers', action='store_true')
    parser.add_argument('-c', '--control', help='regulate best-efforts task\
                        resource usages', action='store_true')
    parser.add_argument('-r', '--record', help='record container CPU\
                        utilizaton and platform metrics in csv file',
                        action='store_true')
    parser.add_argument('-i', '--key-cid', help='use container id in workload\
                        configuration file as key id', action='store_true')
    parser.add_argument('-e', '--enable-hold', help='keep container resource\
                        usage in current level while the usage is close but\
                        not exceed throttle threshold ', action='store_true')
    parser.add_argument('-n', '--disable-cat', help='disable CAT control while\
                        in resource regulation', action='store_true')
    parser.add_argument('-x', '--exclusive-cat', help='use exclusive CAT control while\
                        in resource regulation', action='store_true')
    parser.add_argument('-p', '--enable-prometheus', help='allow eris send\
                        metrics to Prometheus', action='store_true')
    parser.add_argument('-u', '--util-interval', help='CPU utilization monitor\
                        interval', type=int, choices=range(1, 10), default=2)
    parser.add_argument('-m', '--metric-interval', help='platform metrics\
                        monitor interval', type=int, choices=range(5, 60),
                        default=20)
    parser.add_argument('-l', '--llc-cycles', help='cycle number in LLC\
                        controller', type=int, default=6)
    parser.add_argument('-q', '--quota-cycles', help='cycle number in CPU CFS\
                        quota controller', type=int, default=7)
    parser.add_argument('-k', '--margin-ratio', help='margin ratio related to\
                        one logical processor used in CPU cycle regulation',
                        type=float, default=0.5)
    parser.add_argument('-t', '--thresh-file', help='threshold model file build\
                        from analyze.py tool', type=FileType('rt'))
    parser.add_argument('-w', '--tdp-file', help='TDP threshold model file build\
                        from analyze.py tool', type=FileType('rt'))

    args = parser.parse_args()
    if args.verbose:
        print(args)
    return args
 agent command line arguments parse function 
agent command line arguments parse function
agent command line arguments parse function
def parse_arguments():
    parser = ArgumentParser(description='eris agent monitor\
                            container CPU utilization and platform\
                            metrics, detect potential resource\
                            contention and regulate \
                            task resource usages')
    parser.add_argument('workload_conf_file', help='workload configuration\
                        file describes each task name, type, id, request cpu\
                        count', type=FileType('rt'), default='wl.csv')
    parser.add_argument('-v', '--verbose', help='increase output verbosity',
                        action='store_true')
    parser.add_argument('-g', '--collect-metrics', help='collect platform\
                        performance metrics (CPI, MPKI, etc..)',
                        action='store_true')
    parser.add_argument('-d', '--detect', help='detect resource contention\
                        between containers', action='store_true')
    parser.add_argument('-c', '--control', help='regulate best-efforts task\
                        resource usages', action='store_true')
    parser.add_argument('-r', '--record', help='record container CPU\
                        utilizaton and platform metrics in csv file',
                        action='store_true')
    parser.add_argument('-i', '--key-cid', help='use container id in workload\
                        configuration file as key id', action='store_true')
    parser.add_argument('-e', '--enable-hold', help='keep container resource\
                        usage in current level while the usage is close but\
                        not exceed throttle threshold ', action='store_true')
    parser.add_argument('-n', '--disable-cat', help='disable CAT control while\
                        in resource regulation', action='store_true')
    parser.add_argument('-x', '--exclusive-cat', help='use exclusive CAT control while\
                        in resource regulation', action='store_true')
    parser.add_argument('-p', '--enable-prometheus', help='allow eris send\
                        metrics to Prometheus', action='store_true')
    parser.add_argument('-u', '--util-interval', help='CPU utilization monitor\
                        interval', type=int, choices=range(1, 10), default=2)
    parser.add_argument('-m', '--metric-interval', help='platform metrics\
                        monitor interval', type=int, choices=range(5, 60),
                        default=20)
    parser.add_argument('-l', '--llc-cycles', help='cycle number in LLC\
                        controller', type=int, default=6)
    parser.add_argument('-q', '--quota-cycles', help='cycle number in CPU CFS\
                        quota controller', type=int, default=7)
    parser.add_argument('-k', '--margin-ratio', help='margin ratio related to\
                        one logical processor used in CPU cycle regulation',
                        type=float, default=0.5)
    parser.add_argument('-t', '--thresh-file', help='threshold model file build\
                        from analyze.py tool', type=FileType('rt'))
    parser.add_argument('-w', '--tdp-file', help='TDP threshold model file build\
                        from analyze.py tool', type=FileType('rt'))
    args = parser.parse_args()
    if args.verbose:
        print(args)
    return args
def parse_arguments ( ) : parser = ArgumentParser ( description = 'eris agent monitor\
                            container CPU utilization and platform\
                            metrics, detect potential resource\
                            contention and regulate \
                            task resource usages' ) parser . add_argument ( 'workload_conf_file' , help = 'workload configuration\
                        file describes each task name, type, id, request cpu\
                        count' , type = FileType ( 'rt' ) , default = 'wl.csv' ) parser . add_argument ( '-v' , '--verbose' , help = 'increase output verbosity' , action = 'store_true' ) parser . add_argument ( '-g' , '--collect-metrics' , help = 'collect platform\
                        performance metrics (CPI, MPKI, etc..)' , action = 'store_true' ) parser . add_argument ( '-d' , '--detect' , help = 'detect resource contention\
                        between containers' , action = 'store_true' ) parser . add_argument ( '-c' , '--control' , help = 'regulate best-efforts task\
                        resource usages' , action = 'store_true' ) parser . add_argument ( '-r' , '--record' , help = 'record container CPU\
                        utilizaton and platform metrics in csv file' , action = 'store_true' ) parser . add_argument ( '-i' , '--key-cid' , help = 'use container id in workload\
                        configuration file as key id' , action = 'store_true' ) parser . add_argument ( '-e' , '--enable-hold' , help = 'keep container resource\
                        usage in current level while the usage is close but\
                        not exceed throttle threshold ' , action = 'store_true' ) parser . add_argument ( '-n' , '--disable-cat' , help = 'disable CAT control while\
                        in resource regulation' , action = 'store_true' ) parser . add_argument ( '-x' , '--exclusive-cat' , help = 'use exclusive CAT control while\
                        in resource regulation' , action = 'store_true' ) parser . add_argument ( '-p' , '--enable-prometheus' , help = 'allow eris send\
                        metrics to Prometheus' , action = 'store_true' ) parser . add_argument ( '-u' , '--util-interval' , help = 'CPU utilization monitor\
                        interval' , type = int , choices = range ( 1 , 10 ) , default = 2 ) parser . add_argument ( '-m' , '--metric-interval' , help = 'platform metrics\
                        monitor interval' , type = int , choices = range ( 5 , 60 ) , default = 20 ) parser . add_argument ( '-l' , '--llc-cycles' , help = 'cycle number in LLC\
                        controller' , type = int , default = 6 ) parser . add_argument ( '-q' , '--quota-cycles' , help = 'cycle number in CPU CFS\
                        quota controller' , type = int , default = 7 ) parser . add_argument ( '-k' , '--margin-ratio' , help = 'margin ratio related to\
                        one logical processor used in CPU cycle regulation' , type = float , default = 0.5 ) parser . add_argument ( '-t' , '--thresh-file' , help = 'threshold model file build\
                        from analyze.py tool' , type = FileType ( 'rt' ) ) parser . add_argument ( '-w' , '--tdp-file' , help = 'TDP threshold model file build\
                        from analyze.py tool' , type = FileType ( 'rt' ) ) args = parser . parse_args ( ) if args . verbose : print ( args ) return args
agent command line arguments parse function
agent command line arguments parse function
""" agent command line arguments parse function """