Changeset 239


Ignore:
Timestamp:
05/14/10 16:27:13 (14 years ago)
Author:
bas
Message:

examples/new_rack_pbsmon.py:

  • we are switched to new PBSQuery interface
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/new_rack_pbsmon.py

    r202 r239  
    229229                        continue
    230230
    231                 state = node['state']
    232                 if string.find(state, ',') >= 0:                        # multiple states for a node?
    233                         state = string.split(state, ',')[-1]
     231                # A node can have multiple states
     232                state = node['state'][0]
    234233
    235234                state_char = PBS_STATES[state]
     
    244243                                count_states[pbs_ND_single] += 1
    245244                        else:
    246                                 if  node['properties'].find('infiniband') >= 0:
     245                                if  'infiniband' in node['properties']:
    247246                                        count_states[pbs_ND_free_parallel] +=  1
    248                                 elif  node['properties'].find('gigabit') >= 0:
     247                                elif  'gigabit' in node['properties']:
    249248                                        count_states[pbs_ND_free_serial] +=  1
    250249                                #else:
Note: See TracChangeset for help on using the changeset viewer.