2015-02-09 91 views
1

在SSH,當我運行此命令諾娃診斷

nova diagnostics 2ad0dda0-072d-46c4-8689-3c487a452248

我devstack

+---------------------------+----------------------+ 
| Property     | Value    | 
+---------------------------+----------------------+ 
| cpu0_time     | 3766640000000  | 
| hdd_errors    | 18446744073709551615 | 
| hdd_read     | 111736    | 
| hdd_read_req    | 73     | 
| hdd_write     | 0     | 
| hdd_write_req    | 0     | 
| memory     | 2097152    | 
| memory-actual    | 2097152    | 
| memory-available   | 1922544    | 
| memory-major_fault  | 2710     | 
| memory-minor_fault  | 10061504    | 
| memory-rss    | 509392    | 
| memory-swap_in   | 0     | 
| memory-swap_out   | 0     | 
| memory-unused    | 1079468    | 
| tap5a148e0f-b8_rx   | 959777    | 
| tap5a148e0f-b8_rx_drop | 0     | 
| tap5a148e0f-b8_rx_errors | 0     | 
| tap5a148e0f-b8_rx_packets | 8758     | 
| tap5a148e0f-b8_tx   | 48872    | 
| tap5a148e0f-b8_tx_drop | 0     | 
| tap5a148e0f-b8_tx_errors | 0     | 
| tap5a148e0f-b8_tx_packets | 615     | 
| vda_errors    | 18446744073709551615 | 
| vda_read     | 597230592   | 
| vda_read_req    | 31443    | 
| vda_write     | 164690944   | 
| vda_write_req    | 18422    | 
+---------------------------+----------------------+ 

得到了所有的資源,我怎樣才能得到這個devstack用戶界面。

請幫助..

在此先感謝

回答

0

其在OpenStack的冰窖不可/ JUNO版本,雖然它可以在JUNO編輯在devstack檢索。

我沒有使用openstack Kilo。在juno中,如果您的虛擬機管理程序是libvirt,Vsphere或XenAPI,那麼您可以在devstack UI中檢索此統計信息。爲此,你必須這樣做:

對於Libvirt庫 在這個位置雲高儀/計算/的virt/libvirt的/ inspector.py,補充一點:

from oslo.utils import units 
from ceilometer.compute.pollsters import util 


    def inspect_memory_usage(self, instance, duration=None): 
     instance_name = util.instance_name(instance)  
     domain = self._lookup_by_name(instance_name)  
     state = domain.info()[0]  
     if state == libvirt.VIR_DOMAIN_SHUTOFF: 
      LOG.warn(_('Failed to inspect memory usage of %(instance_name)s, ' 
         'domain is in state of SHUTOFF'),  
        {'instance_name': instance_name}) 
      return 
     try:  
      memory_stats = domain.memoryStats() 
      if (memory_stats and  
        memory_stats.get('available') and 
        memory_stats.get('unused')):  
       memory_used = (memory_stats.get('available') - 
           memory_stats.get('unused')) 
       # Stat provided from libvirt is in KB, converting it to MB.  
       memory_used = memory_used/units.Ki  
       return virt_inspector.MemoryUsageStats(usage=memory_used) 
      else: 
       LOG.warn(_('Failed to inspect memory usage of ' 
          '%(instance_name)s, can not get info from libvirt'), 
         {'instance_name': instance_name}) 
     # memoryStats might launch an exception if the method 
     # is not supported by the underlying hypervisor being 
     # used by libvirt 
     except libvirt.libvirtError as e: 
      LOG.warn(_('Failed to inspect memory usage of %(instance_name)s, ' 
         'can not get info from libvirt: %(error)s'), 
           {'instance_name': instance_name, 'error': e}) 

瞭解更多詳情,您可以檢查以下鏈接:

https://review.openstack.org/#/c/90498/