digitalocean / vmtop

Real-time monitoring of KVM/Qemu VMs
Apache License 2.0
53 stars 19 forks source link

Add vmexit counts for each vmexit reason in CSV format #25

Open yhu-do opened 4 months ago

yhu-do commented 4 months ago

This change adds vmexit counts for each vmexit reason in CSV format. The output will be following:

  1. $ sudo ./vmtop.py --node 0 --vm --vmexit --csv CSV
  2. $ cat CSV/Droplet-7816918.csv timestamp,pid,name,nr_vcpus,mem_node,vcpu_node,vcpu_util,vcpu_steal,emulators_util,emulators_steal,vhost_util,vhost_steal,disk_read,disk_write,rx,tx,rx_dropped,tx_dropped,vmexit_count 2024-04-20 04:42:15,946626,Droplet-7816918,2,0,0,0.08,0.00,0.58,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,45 exception_nmi: 0, external_interrupt: 0, triple_fault: 0, init_signal: 0, n/a: 0, interrupt_window: 0, nmi_window: 0, task_switch: 0, cpuid: 0, hlt: 12, invd: 0, invlpg: 0, rdpmc: 0, rdtsc: 0, vmcall: 0, vmclear: 0, vmlaunch: 0, vmptrld: 0, vmptrst: 0, vmread: 0, vmresume: 0, vmwrite: 0, vmoff: 0, vmon: 0, cr_access: 0, dr_access: 0, io_instruction: 0, msr_read: 0, msr_write: 33, invalid_state: 0, msr_load_fail: 0, mwait_instruction: 0, monitor_trap_flag: 0, monitor_instruction: 0, pause_instruction: 0, mce_during_vmentry: 0, tpr_below_threshold: 0, apic_access: 0, eoi_induced: 0, gdtr_idtr: 0, ldtr_tr: 0, ept_violation: 0, ept_misconfig: 0, invept: 0, rdtscp: 0, preemption_timer: 0, invvpid: 0, wbinvd: 0, xsetbv: 0, apic_write: 0, rdrand: 0, invpcid: 0, vmfunc: 0, encls: 0, rdseed: 0, pml_full: 0, xsaves: 0, xrstors: 0, umwait: 0, tpause: 0, 2024-04-20 04:42:16,946626,Droplet-7816918,2,0,0,0.08,0.00,0.01,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,33 exception_nmi: 0, external_interrupt: 1, triple_fault: 0, init_signal: 0, n/a: 0, interrupt_window: 0, nmi_window: 0, task_switch: 0, cpuid: 0, hlt: 9, invd: 0, invlpg: 0, rdpmc: 0, rdtsc: 0, vmcall: 0, vmclear: 0, vmlaunch: 0, vmptrld: 0, vmptrst: 0, vmread: 0, vmresume: 0, vmwrite: 0, vmoff: 0, vmon: 0, cr_access: 0, dr_access: 0, io_instruction: 0, msr_read: 0, msr_write: 23, invalid_state: 0, msr_load_fail: 0, mwait_instruction: 0, monitor_trap_flag: 0, monitor_instruction: 0, pause_instruction: 0, mce_during_vmentry: 0, tpr_below_threshold: 0, apic_access: 0, eoi_induced: 0, gdtr_idtr: 0, ldtr_tr: 0, ept_violation: 0, ept_misconfig: 0, invept: 0, rdtscp: 0, preemption_timer: 0, invvpid: 0, wbinvd: 0, xsetbv: 0, apic_write: 0, rdrand: 0, invpcid: 0, vmfunc: 0, encls: 0, rdseed: 0, pml_full: 0, xsaves: 0, xrstors: 0, umwait: 0, tpause: 0,