def get_bundle_statuses(self):
        try:
            # Get status
            args = self.dispatch_command.split() + ['info']
            response = self.run_command_get_stdout_json(args)
            if self.verbose >= 2: print '=== get_bundle_statuses: %s' % response
            statuses = []
            for info in response['infos']:
                status = {
                    'exitcode': info.get('exitcode'),
                    'failure_message': 'Exit reason: ' + info.get('exitreason') if info.get('exitreason') else None,
                    'remote': info.get('hostname'),
                    'time': info.get('time'),
                    'memory': info.get('memory'),
                    'state': info.get('state'),
                    'job_handle': info.get('handle'),
                }

                # This only applies when we are running inside docker.
                # We don't have access to the temp_dir at this point, so make a
                # function when given a directory, will retrieve the
                # appropriate information.
                def bundle_handler(bundle):
                    # Read out information from the status file
                    # (See start_bundle for what's printed out)
                    temp_dir = getattr(bundle.metadata, 'temp_dir', None)
                    if temp_dir == None: return {}
                    status_dir = temp_dir + '.status'
                    status_update = {}

                    # Get CPU usage (in contrast, time is wall clock, including CodaLab's time)
                    try:
                        for line in open(os.path.join(status_dir, 'cpuacct.stat')):
                            key, value = line.split(" ")
                            # NOTE: there is a bug in /cgroup where the first values are garbage (way too high).
                            # Convert jiffies to seconds
                            if key == 'user':
                                status_update['time_user'] = int(value) / 100.0
                            elif key == 'system':
                                status_update['time_system'] = int(value) / 100.0
                    except:
                        pass

                    # Get memory usage (seems reliable)
                    try:
                        status_update['memory'] = int(open(os.path.join(status_dir, 'memory.usage_in_bytes')).read())
                    except:
                        pass

                    # Get disk usage (not reliable probably since we're writing to a volume outside docker)
                    try:
                        for line in open(os.path.join(status_dir, 'blkio.throttle.io_service_bytes')):
                            _, key, value = line.split(" ")
                            if key == 'Read':
                                status_update['disk_read'] = int(value)
                            elif key == 'Write':
                                status_update['disk_write'] = int(value)
                    except:
                        pass
                    return status_update

                status['bundle_handler'] = bundle_handler
                    
                status['success'] = status['exitcode'] == 0 if status['exitcode'] is not None else None
                statuses.append(status)
            return statuses
        except Exception, e:
            print '=== INTERNAL ERROR: %s' % e
            traceback.print_exc()
            return []
Return a list of bundle metadata information.
dataset/ETHPy150Open codalab/codalab-cli/codalab/machines/remote_machine.py/RemoteMachine.get_bundle_statuses