~soren/nova/iptables-security-groups

« back to all changes in this revision

Viewing changes to nova/compute/monitor.py

  • Committer: Soren Hansen
  • Date: 2011-01-03 09:56:21 UTC
  • mfrom: (430.2.79 nova)
  • Revision ID: soren@linux2go.dk-20110103095621-qy398qk1uk8o7cy3
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
        Updates the instances statistics and stores the resulting graphs
256
256
        in the internal object store on the cloud controller.
257
257
        """
258
 
        logging.debug('updating %s...', self.instance_id)
 
258
        logging.debug(_('updating %s...'), self.instance_id)
259
259
 
260
260
        try:
261
261
            data = self.fetch_cpu_stats()
285
285
            graph_disk(self, '1w')
286
286
            graph_disk(self, '1m')
287
287
        except Exception:
288
 
            logging.exception('unexpected error during update')
 
288
            logging.exception(_('unexpected error during update'))
289
289
 
290
290
        self.last_updated = utcnow()
291
291
 
351
351
                rd += rd_bytes
352
352
                wr += wr_bytes
353
353
            except TypeError:
354
 
                logging.error('Cannot get blockstats for "%s" on "%s"',
 
354
                logging.error(_('Cannot get blockstats for "%s" on "%s"'),
355
355
                              disk, self.instance_id)
356
356
                raise
357
357
 
373
373
                rx += stats[0]
374
374
                tx += stats[4]
375
375
            except TypeError:
376
 
                logging.error('Cannot get ifstats for "%s" on "%s"',
 
376
                logging.error(_('Cannot get ifstats for "%s" on "%s"'),
377
377
                              interface, self.instance_id)
378
378
                raise
379
379
 
408
408
        try:
409
409
            conn = virt_connection.get_connection(read_only=True)
410
410
        except Exception, exn:
411
 
            logging.exception('unexpected exception getting connection')
 
411
            logging.exception(_('unexpected exception getting connection'))
412
412
            time.sleep(FLAGS.monitoring_instances_delay)
413
413
            return
414
414
 
423
423
            if not domain_id in self._instances:
424
424
                instance = Instance(conn, domain_id)
425
425
                self._instances[domain_id] = instance
426
 
                logging.debug('Found instance: %s', domain_id)
 
426
                logging.debug(_('Found instance: %s'), domain_id)
427
427
 
428
428
        for key in self._instances.keys():
429
429
            instance = self._instances[key]