def learn_routem_configs(device, output_config=False):
    """ Gets the current running config on device
        Args:
            output_config ('bool'): Specifies whether the config
            or path of the config is outputted 
        Raise:
            None
        Returns:
            Config ('dict'): {pid: config}
            ex.) Config = {'123': 'config'}
    """
    output = device.parse("ps -ef | grep routem")['pid']
    configs = {}

    for pid, info in output.items():
        config_data = info['cmd'].split()
        
        if len(config_data) == 4:
            config_data = config_data[2]
        else:
            continue

        if output_config:

            try:
                config_data = device.execute("cat {}".format(config_data))
            except:
                raise ValueError("The config file at {} does not exist.".format(config_data))

        configs.setdefault(pid, config_data)

    return configs