'Returns a dict with information for current memory utilization.
Uses log_prefix in log statements.'

def _memory_data(self, log_prefix):

    machine_data = psutil.virtual_memory()
    process = psutil.Process()
    process_data = {'memory_info': process.get_memory_info(), 'ext_memory_info': process.get_ext_memory_info(), 'memory_percent': process.get_memory_percent(), 'cpu_percent': process.get_cpu_percent()}
    log.info(u'%s    Machine    memory    usage:    %s;    Process    memory    usage:    %s', log_prefix, machine_data, process_data)
    return {'machine_data': machine_data, 'process_data': process_data}
