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 ユーザー インターフェイスでこれを取得するにはどうすればよいですか。

助けてください..

前もって感謝します

4

1 に答える 1

0

devstack で取得するために juno で編集できますが、openstack icehouse/juno バージョンでは使用できません。

openstack Kilo は使用しませんでした。Juno では、ハイパーバイザーが libvirt、Vsphere、または XenAPI の場合、devstack UI でこの統計を取得できます。このためには、これを行う必要があります:

Libvirt の場合 、この場所 ceilometer/compute/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/

于 2015-05-07T09:59:05.487 に答える