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

Electricity consumption not shown on Ubuntu KVM #312

Closed
ivan-koryshkin opened this issue May 16, 2023 · 3 comments
Closed

Electricity consumption not shown on Ubuntu KVM #312

ivan-koryshkin opened this issue May 16, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@ivan-koryshkin
Copy link

Bug description

I'm trying to set up an electricity consumption collection using "scaphandre" from the Green Software Foundation repository.
I noticed that the documentation states that the program works both with virtual machines and with bare-metal ones. I was successfully able to set it up on real machines.
But it doesn't work with virtual machines.
I have a virtual machine with kvm virtualization, but "scaphandre" shows power consumption equal to 0 (screenshot 2). Although the same powertop works well (screenshot 1).

To Reproduce

run on virtual machine (VDS-KVM)
sudo docker run -v /sys/class/powercap:/sys/class/powercap -v /proc:/proc -ti hubblo/scaphandre stdout -t 15

Expected behavior

Electricity consumption shown

Screenshots

Screenshot from 2023-05-15 17-03-23
Screenshot from 2023-05-15 17-03-03

Environment

Type: VDS-KVM
System: Ubuntu 5.4.0-29-generic

@ivan-koryshkin ivan-koryshkin added the bug Something isn't working label May 16, 2023
@bpetit
Copy link
Contributor

bpetit commented May 16, 2023

Hi,

Did you follow this procedure ? https://hubblo-org.github.io/scaphandre-documentation/how-to_guides/propagate-metrics-hypervisor-to-vm_qemu-kvm.html

Do you have a working scaphandre with qemu exporter on the physical machine ?

Without this it wont work as we need real rapl metrics from the host to be transmited to the agent inside the vm.

Would be interesting to see how powertop estimates energy in this context though

@ivan-koryshkin
Copy link
Author

As far as I understand this method for domain owners, I have only a few virtual machines, I have no access to the domain. Please correct me if I'm wrong

@bpetit
Copy link
Contributor

bpetit commented May 17, 2023

You're right, it's made for bare metal machine owners / private cloud staff / ...

Scaphandre doesn't provide (yet) a mean to evaluate the power usage on a virtual machine without gathering metrics from the bare metal host first.

@bpetit bpetit closed this as completed May 17, 2023
@bpetit bpetit added this to General Jun 19, 2024
@bpetit bpetit moved this to Previous releases in General Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Previous releases
Development

No branches or pull requests

2 participants