def parse_pbsnode_lall(output):
    """Parse output of pbsnodes -l all
    """
    frees, exclusives, others, down = 0, 0, 0, 0
    nr_nodes = 0
    nodes = {}
    for k in output:
        if len(k) > 2:
            line = k.split()
            status = line[1]
            node = line[0].split('.')[0]
            if node.startswith('v-'):
                continue
            if status == 'free':
                frees += 1
                nr_nodes += 1
            elif status == 'job-exclusive':
                exclusives += 1
                nr_nodes += 1
            elif status == 'down,offline':
                down += 1
            elif status == 'offline':
                down += 1
            elif status == 'down':
                down += 1
            else:
                others += 1
            nodes[node] = status
    pbsnodes = {'frees': frees, 'nr_nodes': nr_nodes, 'others': others,
        'exclusives': exclusives, 'down': down}
    return pbsnodes, nodes
