Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory collection for VM issue when qemu-guest-agent is not installed #27

Open
MyungChi opened this issue Nov 21, 2018 · 2 comments
Open

Comments

@MyungChi
Copy link

MyungChi commented Nov 21, 2018

kvmtop can't collect memory of VM correctly.
as below, some of VMs are 0 for ram_total, ram_used.

Also, I want to know meaning of ram_vsize and ram_rss. Would U let me know it ?
Is there any workaround to get ram_total / ram_used ?

UUID    name    ram_total       ram_used        ram_vsize       ram_rss ram_minflt      ram_cminflt     ram_majflt      ram_cmajflt
e450c39e-68bf-4983-b82f-bfa09225025c    webserver-cho1-bfa09225025c     1786456 104288  2793398272      529088512       0       0       0       0
292c7b76-93c4-4cc7-879a-f7c0ba84ad7e    mepm    3880652 3759108 5093052416      4260282368      0       0       0       0
0f090e62-57b3-4c82-b75e-0bdfefe8fe98    vedge   3880620 126388  5053624320      3986751488      0       0       0       0
e3836de7-85de-469d-b2a2-23c6cdbf43a7    VM1-23c6cdbf43a7        0       0       1892118528      164352000       0       0       0       0
1268c760-0d2f-4433-94ea-9c6f981e7ef2    VM1-9c6f981e7ef2        0       0       1853149184      153837568       0       0       0       0
9a5f50a8-f22e-4376-830e-3eb88f6aa19e    VM1-3eb88f6aa19e        0       0       1892098048      154271744       0       0       0       0
4b628d5b-212d-4eca-ab61-213715fdf63d    oma     1015236 88128   1891819520      181854208       0       0       0       0
d53899e4-17d1-45c3-8404-ae28f5f7f3a4    server  1015408 185896  73912320        2920448 0       0       0       0
25ab8d9b-6f38-4e9a-8736-492e59e2263d    appPKG007-Com1-492e59e2263d     0       0       1361166336      175026176       0       0       0       0
aaac72f0-1fe8-4ddd-91c7-0004a02dd887    VM1-0004a02dd887        0       0       1876287488      188162048       0       0       0       0
675ad4b0-4c08-4e27-a841-c5f503f0a006    VM1-c5f503f0a006        0       0       1900519424      169979904       0       0       0       0
1624dcd0-a54b-4971-99bf-4b2fe4509949    appPKG007-Com2-4b2fe4509949     0       0       1324355584      143003648       0       0       0       0
dc878b79-4dd6-45b9-aef5-002a335ebde1    VM2-002a335ebde1        0       0       1891819520      181854208       0       0       0       0

58338920-bc48-4a8c-8612-381fcca30f0c    VM2-381fcca30f0c        0       0       1756024832      169889792       0       0       0       0

d53899e4-17d1-45c3-8404-ae28f5f7f3a4    server  1015408 185896  73912320        2920448 0       0       0       0
dc878b79-4dd6-45b9-aef5-002a335ebde1    VM2-002a335ebde1        0       0       1891819520      181854208       0       0       0       0
4b628d5b-212d-4eca-ab61-213715fdf63d    oma     1015236 88128   1891819520      181854208       0       0       0       0
9a5f50a8-f22e-4376-830e-3eb88f6aa19e    VM1-3eb88f6aa19e        0       0       1892098048      154271744       0       0       0       0
292c7b76-93c4-4cc7-879a-f7c0ba84ad7e    mepm    3880652 3759108 5093052416      4260282368      447     0       0       0
675ad4b0-4c08-4e27-a841-c5f503f0a006    VM1-c5f503f0a006        0       0       1900519424      169979904       0       0       0       0
e3836de7-85de-469d-b2a2-23c6cdbf43a7    VM1-23c6cdbf43a7        0       0       1892118528      164352000       0       0       0       0
25ab8d9b-6f38-4e9a-8736-492e59e2263d    appPKG007-Com1-492e59e2263d     0       0       1361166336      175026176       0       0       0       0
0f090e62-57b3-4c82-b75e-0bdfefe8fe98    vedge   3880620 126388  5053624320      3986751488      76      0       0       0
1268c760-0d2f-4433-94ea-9c6f981e7ef2    VM1-9c6f981e7ef2        0       0       1853149184      153837568       0       0       0       0
58338920-bc48-4a8c-8612-381fcca30f0c    VM2-381fcca30f0c        0       0       1756024832      169889792       0       0       0       0
aaac72f0-1fe8-4ddd-91c7-0004a02dd887    VM1-0004a02dd887        0       0       1876287488      188162048       20      0       0       0
e450c39e-68bf-4983-b82f-bfa09225025c    webserver-cho1-bfa09225025c     1786456 104288  2793398272      529088512       0       0       0       0
1624dcd0-a54b-4971-99bf-4b2fe4509949    appPKG007-Com2-4b2fe4509949     0       0       1324355584      143003648       413     0       0       0
292c7b76-93c4-4cc7-879a-f7c0ba84ad7e    mepm    3880652 3759108 5093052416      4260282368      162     0       0       0
aaac72f0-1fe8-4ddd-91c7-0004a02dd887    VM1-0004a02dd887        0       0       1876287488      188162048       24      0       0       0
675ad4b0-4c08-4e27-a841-c5f503f0a006    VM1-c5f503f0a006        0       0       1900519424      169979904       0       0       0       0
e450c39e-68bf-4983-b82f-bfa09225025c    webserver-cho1-bfa09225025c     1786456 104288  2793398272      529088512       0       0       0       0
d53899e4-17d1-45c3-8404-ae28f5f7f3a4    server  1015408 185896  73912320        2920448 0       0       0       0
9a5f50a8-f22e-4376-830e-3eb88f6aa19e    VM1-3eb88f6aa19e        0       0       1892098048      154271744       0       0       0       0
25ab8d9b-6f38-4e9a-8736-492e59e2263d    appPKG007-Com1-492e59e2263d     0       0       1361166336      175026176       0       0       0       0
4b628d5b-212d-4eca-ab61-213715fdf63d    oma     1015236 88128   1891819520      181854208       0       0       0       0
1268c760-0d2f-4433-94ea-9c6f981e7ef2    VM1-9c6f981e7ef2        0       0       1853149184      153837568       0       0       0       0
0f090e62-57b3-4c82-b75e-0bdfefe8fe98    vedge   3880620 126388  5053624320      3986751488      24      0       0       0
dc878b79-4dd6-45b9-aef5-002a335ebde1    VM2-002a335ebde1        0       0       1891819520      181854208       0       0       0       0
58338920-bc48-4a8c-8612-381fcca30f0c    VM2-381fcca30f0c        0       0       1756024832      169959424       75      0       0       0
e3836de7-85de-469d-b2a2-23c6cdbf43a7    VM1-23c6cdbf43a7        0       0       1892118528      164352000       0       0       0       0
1624dcd0-a54b-4971-99bf-4b2fe4509949    appPKG007-Com2-4b2fe4509949     0       0       1324355584      143003648       229     0       0       0
292c7b76-93c4-4cc7-879a-f7c0ba84ad7e    mepm    3880652 3759108 5093052416      4260282368      1096    0       0       0
1268c760-0d2f-4433-94ea-9c6f981e7ef2    VM1-9c6f981e7ef2        0       0       1853149184      153837568       0       0       0       0
58338920-bc48-4a8c-8612-381fcca30f0c    VM2-381fcca30f0c        0       0       1756024832      169959424       0       0       0       0
9a5f50a8-f22e-4376-830e-3eb88f6aa19e    VM1-3eb88f6aa19e        0       0       1892098048      154271744       0       0       0       0
e450c39e-68bf-4983-b82f-bfa09225025c    webserver-cho1-bfa09225025c     1786456 104288  2793398272      529088512       0       0       0       0
1624dcd0-a54b-4971-99bf-4b2fe4509949    appPKG007-Com2-4b2fe4509949     0       0       1324355584      143003648       0       0       0       0
dc878b79-4dd6-45b9-aef5-002a335ebde1    VM2-002a335ebde1        0       0       1891819520      181854208       0       0       0       0
4b628d5b-212d-4eca-ab61-213715fdf63d    oma     1015236 88128   1891819520      181854208       0       0       0       0
aaac72f0-1fe8-4ddd-91c7-0004a02dd887    VM1-0004a02dd887        0       0       1876287488      188162048       0       0       0       0
d53899e4-17d1-45c3-8404-ae28f5f7f3a4    server  1015408 185896  73912320        2920448 0       0       0       0
25ab8d9b-6f38-4e9a-8736-492e59e2263d    appPKG007-Com1-492e59e2263d     0       0       1361166336      175026176       0       0       0       0
675ad4b0-4c08-4e27-a841-c5f503f0a006    VM1-c5f503f0a006        0       0       1900519424      169979904       0       0       0       0
0f090e62-57b3-4c82-b75e-0bdfefe8fe98    vedge   3880620 126388  5053624320      3986751488      2       0       0       0
e3836de7-85de-469d-b2a2-23c6cdbf43a7    VM1-23c6cdbf43a7        0       0       1892118528      164352000       0       0       0       0
1268c760-0d2f-4433-94ea-9c6f981e7ef2    VM1-9c6f981e7ef2        0       0       1853149184      153837568       0       0       0       0
dc878b79-4dd6-45b9-aef5-002a335ebde1    VM2-002a335ebde1        0       0       1891819520      181854208       0       0       0       0
58338920-bc48-4a8c-8612-381fcca30f0c    VM2-381fcca30f0c        0       0       1756024832      169959424       6       0       0       0
25ab8d9b-6f38-4e9a-8736-492e59e2263d    appPKG007-Com1-492e59e2263d     0       0       1361166336      175026176       0       0       0       0
e450c39e-68bf-4983-b82f-bfa09225025c    webserver-cho1-bfa09225025c     1786456 104288  2793398272      529088512       0       0       0       0
292c7b76-93c4-4cc7-879a-f7c0ba84ad7e    mepm    3880652 3759108 5093052416      4260282368      20      0       0       0
0f090e62-57b3-4c82-b75e-0bdfefe8fe98    vedge   3880620 126388  5053624320      3986751488      0       0       0       0
d53899e4-17d1-45c3-8404-ae28f5f7f3a4    server  1015408 185896  73912320        2920448 0       0       0       0
4b628d5b-212d-4eca-ab61-213715fdf63d    oma     1015236 88128   1891819520      181854208       0       0       0       0
9a5f50a8-f22e-4376-830e-3eb88f6aa19e    VM1-3eb88f6aa19e        0       0       1892098048      154271744       0       0       0       0
e3836de7-85de-469d-b2a2-23c6cdbf43a7    VM1-23c6cdbf43a7        0       0       1892118528      164352000       0       0       0       0
1624dcd0-a54b-4971-99bf-4b2fe4509949    appPKG007-Com2-4b2fe4509949     0       0       1324355584      143003648       8       0       0       0
aaac72f0-1fe8-4ddd-91c7-0004a02dd887    VM1-0004a02dd887        0       0       1876287488      188162048       1       0       0       0
675ad4b0-4c08-4e27-a841-c5f503f0a006    VM1-c5f503f0a006        0       0       1900519424      169979904       0       0       0       0

@MyungChi
Copy link
Author

Additionally, I checked one VM with cli.

$ virsh dumpxml VM2-381fcca30f0c
<domain type='kvm' id='433'>
  <name>VM2-381fcca30f0c</name>
  <uuid>58338920-bc48-4a8c-8612-381fcca30f0c</uuid>
  <memory unit='KiB'>1000448</memory>
  <currentMemory unit='KiB'>1000000</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.5.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>IvyBridge-IBRS</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='pcid'/>
    <feature policy='require' name='hypervisor'/>
    <feature policy='require' name='arat'/>
    <feature policy='require' name='tsc_adjust'/>
    <feature policy='require' name='stibp'/>
    <feature policy='require' name='ssbd'/>
    <feature policy='require' name='xsaveopt'/>
    <feature policy='require' name='pdpe1gb'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/opt/oma/images/58338920-bc48-4a8c-8612-381fcca30f0c/20181115165827489.img'/>
      <backingStore type='file' index='1'>
        <format type='raw'/>
        <source file='/opt/oma/images/_backing/COMPONEN-908e-41f6-ae97-2e241fb7406e/20181115165827489.img'/>
        <backingStore/>
      </backingStore>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/opt/oma/images/58338920-bc48-4a8c-8612-381fcca30f0c/cloudinit.iso'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:fc:78:eb'/>
      <source network='private-net' bridge='private'/>
      <target dev='vnet28'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/25'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/25'>
      <source path='/dev/pts/25'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <graphics type='spice' port='5915' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
      <image compression='off'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+107:+107</label>
    <imagelabel>+107:+107</imagelabel>
  </seclabel>
</domain>
$ virsh dommemstat VM2-381fcca30f0c
actual 1000000
swap_in 0
last_update 1542616192
rss 166144

@cha87de cha87de added the bug label Dec 10, 2018
@MyungChi
Copy link
Author

MyungChi commented Dec 10, 2018

As my investigation, It is happen when qemu-guest-agent is not installed on VM.

@cha87de cha87de changed the title Memory collection for VM issue Memory collection for VM issue when qemu-guest-agent is not installed Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants