Changeset 69
- Timestamp:
- 04/14/05 15:51:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugin/togap.py
r68 r69 3 3 # Specify debugging level here; 4 4 # 5 DEBUG_LEVEL = 105 DEBUG_LEVEL = 0 6 6 7 7 # Wether or not to run as a daemon in background … … 52 52 sys.exit( 1 ) 53 53 54 #incompatible = self.checkGmetricVersion() 55 incompatible = 0 54 incompatible = self.checkGmetricVersion() 56 55 57 56 if incompatible: … … 69 68 line = line.split( ' ' ) 70 69 71 if len( line ) == 2 and line.find( 'gmetric' ) != -1:70 if len( line ) == 2 and str(line).find( 'gmetric' ) != -1: 72 71 73 gmetric_version = line[1] 74 75 version_major = int( g emtric_version.split( '.' )[0] )76 version_minor = int( g emtric_version.split( '.' )[1] )77 version_patch = int( g emtric_version.split( '.' )[2] )72 gmetric_version = line[1].split( '\n' )[0] 73 74 version_major = int( gmetric_version.split( '.' )[0] ) 75 version_minor = int( gmetric_version.split( '.' )[1] ) 76 version_patch = int( gmetric_version.split( '.' )[2] ) 78 77 79 78 incompatible = 0 … … 106 105 107 106 print cmd 108 #os.system( cmd )107 os.system( cmd ) 109 108 110 109 class PBSDataGatherer: … … 158 157 joblist = self.pq.getjobs() 159 158 160 cur_time = time.time()159 self.cur_time = time.time() 161 160 162 161 jobs_processed = [ ] 163 162 164 163 for name, attrs in joblist.items(): 165 166 print attrs167 164 168 165 job_id = name.split( '.' )[0] … … 201 198 myAttrs['status'] = status 202 199 myAttrs['start_timestamp'] = start_timestamp 203 myAttrs['reported_timestamp'] = str( int( cur_time ) )200 myAttrs['reported_timestamp'] = str( int( self.cur_time ) ) 204 201 myAttrs['nodes'] = nodeslist 205 202 myAttrs['domain'] = string.join( socket.getfqdn().split( '.' )[1:], '.' ) … … 208 205 jobs[ job_id ] = myAttrs 209 206 210 self.printJob( jobs, job_id )207 #self.printJob( jobs, job_id ) 211 208 212 209 debug_msg( 10, printTime() + ' job %s state changed' %(job_id) ) … … 216 213 def submitJobData( self, jobs ): 217 214 """Submit job info list""" 215 216 self.dp.multicastGmetric( 'TOGA-HEARTBEAT', str( int( self.cur_time ) ) ) 218 217 219 218 # Now let's spread the knowledge … … 287 286 """Check if val + text size is not above 1400 (max msg size)""" 288 287 288 # Max frame size of a udp datagram is 1500 bytes 289 # removing misc header and gmetric stuff leaves about 1400 bytes 290 # 289 291 if len( val + text ) > 1400: 290 292 return 1
Note: See TracChangeset
for help on using the changeset viewer.