Changeset 80
- Timestamp:
- 04/18/05 10:42:27 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugin/togap.py
r76 r80 40 40 self.binary = binary 41 41 42 self.tmax = str( TORQUE_POLL_INTERVAL ) 42 # Timeout for XML 43 # 44 # From ganglia's documentation: 45 # 46 # 'A metric will be deleted DMAX seconds after it is received, and 47 # DMAX=0 means eternal life.' 48 49 self.dmax = str( int( TORQUE_POLL_INTERVAL ) - 1 ) 43 50 44 51 try: … … 102 109 debug_msg( 10, 'Assuming /etc/gmond.conf for gmetric cmd (ommitting)' ) 103 110 104 cmd = cmd + ' -n' + str( metricname )+ ' -v"' + str( metricval )+ '" -t' + str( valtype ) + ' - x' + str( self.tmax )111 cmd = cmd + ' -n' + str( metricname )+ ' -v"' + str( metricval )+ '" -t' + str( valtype ) + ' -d' + str( self.dmax ) 105 112 106 113 print cmd … … 201 208 myAttrs['nodes'] = nodeslist 202 209 myAttrs['domain'] = string.join( socket.getfqdn().split( '.' )[1:], '.' ) 210 myAttrs['poll_interval'] = TORQUE_POLL_INTERVAL 203 211 204 212 if self.jobDataChanged( jobs, job_id, myAttrs ): … … 249 257 """Create a val string for gmetric of jobinfo""" 250 258 251 name_str = 'name=' + jobattrs['name']252 queue_str = 'queue=' + jobattrs['queue']253 owner_str = 'owner=' + jobattrs['owner']254 rtime_str = 'requested_time=' + jobattrs['requested_time']255 rmem_str = 'requested_memory=' + jobattrs['requested_memory']256 ppn_str = 'ppn=' + jobattrs['ppn']257 status_str = 'status=' + jobattrs['status']258 stime_str = 'start_timestamp=' + jobattrs['start_timestamp']259 reported_str = 'reported=' + jobattrs['reported']260 domain_str = 'domain=' + jobattrs['domain']261 node_str = 'nodes=' + self.makeNodeString( jobattrs['nodes'] )262 263 appendList = [ name_str, queue_str, owner_str, rtime_str, rmem_str, ppn_str, status_str, stime_str, reported_str, domain_str, node_str ]259 appendList = [ ] 260 appendList.append( 'name=' + jobattrs['name'] ) 261 appendList.append( 'queue=' + jobattrs['queue'] ) 262 appendList.append( 'owner=' + jobattrs['owner'] ) 263 appendList.append( 'requested_time=' + jobattrs['requested_time'] ) 264 appendList.append( 'requested_memory=' + jobattrs['requested_memory'] ) 265 appendList.append( 'ppn=' + jobattrs['ppn'] ) 266 appendList.append( 'status=' + jobattrs['status'] ) 267 appendList.append( 'start_timestamp=' + jobattrs['start_timestamp'] ) 268 appendList.append( 'reported=' + jobattrs['reported'] ) 269 appendList.append( 'poll_interval=' + jobattrs['poll_interval'] ) 270 appendList.append( 'domain=' + jobattrs['domain'] ) 271 appendList.append( 'nodes=' + self.makeNodeString( jobattrs['nodes'] ) ) 264 272 265 273 return self.makeAppendLists( appendList )
Note: See TracChangeset
for help on using the changeset viewer.