parameters: (self)
return_statement: return [y for x,y in w]
docstring: Return normalized load on *everything*, sorted by highest current load first.
docstring_summary: Return normalized load on *everything*, sorted by highest current load first.
docstring_tokens: Return normalized load on * everything * sorted by highest current load first .
function: def load(self):
          """
          Return normalized load on *everything*, sorted by highest current load first.
          """
          ans = []
          for k, v in self._hosts('all', 'nproc && uptime', parallel=True, wait=True, timeout=80).iteritems():
              d = {'host':k[0]}
              m = v.get('stdout','').splitlines()
              if v.get('exit_status',1) != 0 or len(m) < 2:
                  d['status'] = 'down'
              else:
                  d['status'] = 'up'
                  d['nproc'] = int(m[0])
                  z = m[1].replace(',','').split()
                  d['load1'] = float(z[-3])/d['nproc']
                  d['load5'] = float(z[-2])/d['nproc']
                  d['load15'] = float(z[-1])/d['nproc']
                  ans.append(d)
          w = [(-d['load1'], d) for d in ans]
          w.sort()
          return [y for x,y in w]
function_tokens: def load ( self ) : ans = [ ] for k , v in self . _hosts ( 'all' , 'nproc && uptime' , parallel = True , wait = True , timeout = 80 ) . iteritems ( ) : d = { 'host' : k [ 0 ] } m = v . get ( 'stdout' , '' ) . splitlines ( ) if v . get ( 'exit_status' , 1 ) != 0 or len ( m ) < 2 : d [ 'status' ] = 'down' else : d [ 'status' ] = 'up' d [ 'nproc' ] = int ( m [ 0 ] ) z = m [ 1 ] . replace ( ',' , '' ) . split ( ) d [ 'load1' ] = float ( z [ - 3 ] ) / d [ 'nproc' ] d [ 'load5' ] = float ( z [ - 2 ] ) / d [ 'nproc' ] d [ 'load15' ] = float ( z [ - 1 ] ) / d [ 'nproc' ] ans . append ( d ) w = [ ( - d [ 'load1' ] , d ) for d in ans ] w . sort ( ) return [ y for x , y in w ]