Scaphandre is a metrology agent dedicated to electrical power consumption metrics.

Overview

Scaphandre

Your tech stack doesn't need so much energy


Scaphandre [skafɑ̃dʁ] is a metrology agent dedicated to electrical power consumption metrics. The goal of the project is to permit to any company or individual to measure the power consumption of its tech services and get this data in a convenient form, sending it through any monitoring or data analysis toolchain.

Scaphandre means heavy diving suit in 🇫🇷 . It comes from the idea that tech related services often don't track their power consumption and thus don't expose it to their clients. Most of the time the reason is a presumed bad ROI. Scaphandre makes, for tech providers and tech users, easier and cheaper to go under the surface to bring back the desired power consumption metrics, take better sustainability focused decisions, and then show the metrics to their clients to allow them to do the same.

This project was born from a deep sense of duty from tech workers. Please refer to the why section for know more about its goals.

Warning: this is still a very early stage project. Any feedback or contribution will be highly appreciated. Please refer to the contribution section.

Fmt+Clippy

Join us on Gitter or Matrix !


Features

  • measuring power consumption on bare metal hosts
  • measuring power consumption of qemu/kvm virtual machines from the host
  • exposing power consumption metrics of a virtual machine, to allow manipulating those metrics in the VM as if it was a bare metal machine (relies on hypervisor features)
  • exposing power consumption metrics as a prometheus (HTTP) exporter
  • sending power consumption metrics to riemann
  • sending power consumption metrics to Warp10
  • works on kubernetes
  • storing power consumption metrics in a JSON file
  • showing basic power consumption metrics in the terminal

Here is an example dashboard built thanks to scaphandre: https://metrics.hubblo.org.

📄 How to ... ?

You'll find everything you may want to know about scaphandre in the documentation, like:

If you are only interested in the code documentation here it is.

📅 Roadmap

The ongoing roadmap can be seen here. Feature requests are welcome, please join us.

⚖️ Footprint

In opposition to its name, scaphandre aims to be as light and clean as possible. One of the main focus areas of the project is to come as close as possible to a 0 overhead, both about resources consumption and power consumption.

Comments
  • Thread 'main' panicked at 'Trick: if you are running on a vm' when machine is not a VM

    Thread 'main' panicked at 'Trick: if you are running on a vm' when machine is not a VM

    Bug description

    Running scaphandre on bare metal (no VM) produces the following error, even though the machine is not a virtual machine:

    Scaphandre stdout exporter
    Sending ⚡ metrics
    thread 'main' panicked at 'Trick: if you are running on a vm, do not forget to use --vm parameter invoking scaphandre at the command line', src/sensors/mod.rs:263:18
    stack backtrace:
       0: rust_begin_unwind
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/std/src/panicking.rs:493:5
       1: core::panicking::panic_fmt
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/core/src/panicking.rs:92:14
       2: core::option::expect_failed
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/core/src/option.rs:1292:5
       3: core::option::Option<T>::expect
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/core/src/option.rs:349:21
       4: scaphandre::sensors::Topology::add_cpu_cores
                 at ./src/sensors/mod.rs:259:26
       5: <scaphandre::sensors::powercap_rapl::PowercapRAPLSensor as scaphandre::sensors::Sensor>::generate_topology
                 at ./src/sensors/powercap_rapl.rs:106:9
       6: <scaphandre::sensors::powercap_rapl::PowercapRAPLSensor as scaphandre::sensors::Sensor>::get_topology
                 at ./src/sensors/powercap_rapl.rs:112:24
       7: scaphandre::exporters::stdout::StdoutExporter::runner
                 at ./src/exporters/stdout.rs:122:24
       8: <scaphandre::exporters::stdout::StdoutExporter as scaphandre::exporters::Exporter>::run
                 at ./src/exporters/stdout.rs:19:9
       9: scaphandre::run
                 at ./src/lib.rs:74:9
      10: scaphandre::main
                 at ./src/main.rs:81:5
      11: core::ops::function::FnOnce::call_once
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/core/src/ops/function.rs:227:5
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    

    Adding the "--vm" argument gives (and still does not work):

    scaphandre::sensors::powercap_rapl: Powercap_rapl path is: /var/scaphandre
    Scaphandre stdout exporter
    Sending ⚡ metrics
    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/sensors/powercap_rapl.rs:76:53
    stack backtrace:
       0: rust_begin_unwind
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/std/src/panicking.rs:493:5
       1: core::panicking::panic_fmt
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/core/src/panicking.rs:92:14
       2: core::result::unwrap_failed
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/core/src/result.rs:1284:5
       3: core::result::Result<T,E>::unwrap
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/core/src/result.rs:1037:23
       4: <scaphandre::sensors::powercap_rapl::PowercapRAPLSensor as scaphandre::sensors::Sensor>::generate_topology
                 at ./src/sensors/powercap_rapl.rs:76:23
       5: <scaphandre::sensors::powercap_rapl::PowercapRAPLSensor as scaphandre::sensors::Sensor>::get_topology
                 at ./src/sensors/powercap_rapl.rs:112:24
       6: scaphandre::exporters::stdout::StdoutExporter::runner
                 at ./src/exporters/stdout.rs:122:24
       7: <scaphandre::exporters::stdout::StdoutExporter as scaphandre::exporters::Exporter>::run
                 at ./src/exporters/stdout.rs:19:9
       8: scaphandre::run
                 at ./src/lib.rs:74:9
       9: scaphandre::main
                 at ./src/main.rs:81:5
      10: core::ops::function::FnOnce::call_once
                 at /build/rustc-h1hlaa/rustc-1.51.0+dfsg1+llvm/library/core/src/ops/function.rs:227:5
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    

    Reloading the rapl kernel modules, and restarting the machine does not seem to change anything.

    To Reproduce

    cargo build
    ./target/debug/scaphandre stdout
    

    Expected behavior

    Something should happen :)

    Environment

    Linux Distribution: Ubuntu 18.04.5 LTS Linux Kernel: 5.14.15-051415-generic (Also had issues with 5.04)

    >> lsmod | grep rapl
    
    intel_rapl_msr         20480  0
    intel_rapl_common      24576  1 intel_rapl_msr
    rapl                   20480  0
    
    >> ls /sys/class/powercap
    dtpm  intel-rapl  intel-rapl:0
    
    >> lshw -short
    
    H/W path             Device          Class          Description
    ===============================================================
                                         system         System Product Name
    /0                                   bus            WS X299 SAGE
    /0/1                                 memory         64KiB BIOS
    /0/4a                                memory         System Memory
    /0/4a/0                              memory         16GiB DIMM DDR4 Synchronous 2667 MHz (0.4 ns)
    /0/4a/1                              memory         16GiB DIMM DDR4 Synchronous 2667 MHz (0.4 ns)
    /0/4a/2                              memory         16GiB DIMM DDR4 Synchronous 2667 MHz (0.4 ns)
    /0/4a/3                              memory         16GiB DIMM DDR4 Synchronous 2667 MHz (0.4 ns)
    /0/54                                memory         System Memory
    /0/54/0                              memory         16GiB DIMM DDR4 Synchronous 2667 MHz (0.4 ns)
    /0/54/1                              memory         16GiB DIMM DDR4 Synchronous 2667 MHz (0.4 ns)
    /0/54/2                              memory         16GiB DIMM DDR4 Synchronous 2667 MHz (0.4 ns)
    /0/54/3                              memory         16GiB DIMM DDR4 Synchronous 2667 MHz (0.4 ns)
    /0/5e                                memory         896KiB L1 cache
    /0/5f                                memory         14MiB L2 cache
    /0/60                                memory         19MiB L3 cache
    /0/61                                processor      Intel(R) Core(TM) i9-9940X CPU @ 3.30GHz
    /0/2                                 memory
    /0/3                                 memory
    /0/100                               bridge         Sky Lake-E DMI3 Registers
    /0/100/4                             generic        Sky Lake-E CBDMA Registers
    /0/100/4.1                           generic        Sky Lake-E CBDMA Registers
    /0/100/4.2                           generic        Sky Lake-E CBDMA Registers
    /0/100/4.3                           generic        Sky Lake-E CBDMA Registers
    /0/100/4.4                           generic        Sky Lake-E CBDMA Registers
    /0/100/4.5                           generic        Sky Lake-E CBDMA Registers
    /0/100/4.6                           generic        Sky Lake-E CBDMA Registers
    /0/100/4.7                           generic        Sky Lake-E CBDMA Registers
    /0/100/5                             generic        Sky Lake-E MM/Vt-d Configuration Registers
    /0/100/5.2                           generic        Intel Corporation
    /0/100/5.4                           generic        Intel Corporation
    /0/100/8                             generic        Sky Lake-E Ubox Registers
    /0/100/8.1                           generic        Sky Lake-E Ubox Registers
    /0/100/8.2                           generic        Sky Lake-E Ubox Registers
    /0/100/14                            bus            200 Series/Z370 Chipset Family USB 3.0 xHCI Controller
    /0/100/14/0          usb1            bus            xHCI Host Controller
    /0/100/14/0/e                        input          AURA Custom Human interface
    /0/100/14/1          usb2            bus            xHCI Host Controller
    /0/100/14.2                          generic        200 Series PCH Thermal Subsystem
    /0/100/16                            communication  200 Series PCH CSME HECI #1
    /0/100/17                            storage        200 Series PCH SATA controller [AHCI mode]
    /0/100/1b                            bridge         200 Series PCH PCI Express Root Port #17
    /0/100/1b.4                          bridge         200 Series PCH PCI Express Root Port #21
    /0/100/1b.4/0                        storage        NVMe SSD Controller SM981/PM981
    /0/100/1b.4/0/0      /dev/nvme0      storage        Samsung SSD 970 EVO Plus 2TB
    /0/100/1b.4/0/0/1    /dev/nvme0n1    disk           2TB NVMe namespace
    /0/100/1b.4/0/0/1/1                  volume         511MiB Windows FAT volume
    /0/100/1b.4/0/0/1/2  /dev/nvme0n1p2  volume         1862GiB EXT4 volume
    /0/100/1c                            bridge         200 Series PCH PCI Express Root Port #1
    /0/100/1c.2                          bridge         200 Series PCH PCI Express Root Port #3
    /0/100/1c.2/0        enp4s0          network        I210 Gigabit Network Connection
    /0/100/1d                            bridge         200 Series PCH PCI Express Root Port #9
    /0/100/1d/0                          bus            ASMedia Technology Inc.
    /0/100/1d/0/0        usb3            bus            xHCI Host Controller
    /0/100/1d/0/1        usb4            bus            xHCI Host Controller
    /0/100/1d.2                          bridge         200 Series PCH PCI Express Root Port #11
    /0/100/1d.2/0                        bus            ASMedia Technology Inc.
    /0/100/1d.2/0/0      usb5            bus            xHCI Host Controller
    /0/100/1d.2/0/1      usb6            bus            xHCI Host Controller
    /0/100/1f                            bridge         X299 Chipset LPC/eSPI Controller
    /0/100/1f.2                          memory         Memory controller
    /0/100/1f.3                          multimedia     200 Series PCH HD Audio
    /0/100/1f.4                          bus            200 Series/Z370 Chipset Family SMBus Controller
    /0/100/1f.6          eno1            network        Ethernet Connection (2) I219-LM
    /0/101                               bridge         Sky Lake-E PCI Express Root Port A
    /0/101/0                             bridge         PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch
    /0/101/0/8                           bridge         PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch
    /0/101/0/10                          bridge         PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch
    /0/4                                 generic        Intel Corporation
    /0/6                                 generic        Sky Lake-E RAS Configuration Registers
    /0/7                                 generic        Intel Corporation
    /0/8                                 generic        Sky Lake-E CHA Registers
    /0/8.1                               generic        Sky Lake-E CHA Registers
    /0/8.2                               generic        Sky Lake-E CHA Registers
    /0/8.3                               generic        Sky Lake-E CHA Registers
    /0/8.4                               generic        Sky Lake-E CHA Registers
    /0/8.5                               generic        Sky Lake-E CHA Registers
    /0/8.6                               generic        Sky Lake-E CHA Registers
    /0/8.7                               generic        Sky Lake-E CHA Registers
    /0/9                                 generic        Sky Lake-E CHA Registers
    /0/9.1                               generic        Sky Lake-E CHA Registers
    /0/9.2                               generic        Sky Lake-E CHA Registers
    /0/9.3                               generic        Sky Lake-E CHA Registers
    /0/9.4                               generic        Sky Lake-E CHA Registers
    /0/9.5                               generic        Sky Lake-E CHA Registers
    /0/9.6                               generic        Sky Lake-E CHA Registers
    /0/9.7                               generic        Sky Lake-E CHA Registers
    /0/a                                 generic        Sky Lake-E CHA Registers
    /0/11                                generic        Sky Lake-E CHA Registers
    /0/e                                 generic        Sky Lake-E CHA Registers
    /0/e.1                               generic        Sky Lake-E CHA Registers
    /0/e.2                               generic        Sky Lake-E CHA Registers
    /0/e.3                               generic        Sky Lake-E CHA Registers
    /0/e.4                               generic        Sky Lake-E CHA Registers
    /0/e.5                               generic        Sky Lake-E CHA Registers
    /0/e.6                               generic        Sky Lake-E CHA Registers
    /0/e.7                               generic        Sky Lake-E CHA Registers
    /0/f                                 generic        Sky Lake-E CHA Registers
    /0/f.1                               generic        Sky Lake-E CHA Registers
    /0/f.2                               generic        Sky Lake-E CHA Registers
    /0/f.3                               generic        Sky Lake-E CHA Registers
    /0/f.4                               generic        Sky Lake-E CHA Registers
    /0/f.5                               generic        Sky Lake-E CHA Registers
    /0/f.6                               generic        Sky Lake-E CHA Registers
    /0/f.7                               generic        Sky Lake-E CHA Registers
    /0/10                                generic        Sky Lake-E CHA Registers
    /0/10.1                              generic        Sky Lake-E CHA Registers
    /0/1d                                generic        Sky Lake-E CHA Registers
    /0/1d.1                              generic        Sky Lake-E CHA Registers
    /0/1d.2                              generic        Sky Lake-E CHA Registers
    /0/1d.3                              generic        Sky Lake-E CHA Registers
    /0/1e                                generic        Sky Lake-E PCU Registers
    /0/1e.1                              generic        Sky Lake-E PCU Registers
    /0/1e.2                              generic        Sky Lake-E PCU Registers
    /0/1e.3                              generic        Sky Lake-E PCU Registers
    /0/1e.4                              generic        Sky Lake-E PCU Registers
    /0/1e.5                              generic        Sky Lake-E PCU Registers
    /0/1e.6                              generic        Sky Lake-E PCU Registers
    /0/0                                 bridge         Sky Lake-E PCI Express Root Port A
    /0/0/0                               bridge         PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch
    /0/0/0/8                             bridge         PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch
    /0/0/0/8/0                           display        NVIDIA Corporation
    /0/0/0/8/0.1                         multimedia     NVIDIA Corporation
    /0/0/0/8/0.2                         bus            NVIDIA Corporation
    /0/0/0/8/0.2/0       usb7            bus            xHCI Host Controller
    /0/0/0/8/0.2/1       usb8            bus            xHCI Host Controller
    /0/0/0/8/0.3                         bus            NVIDIA Corporation
    /0/0/0/10                            bridge         PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch
    /0/0/0/10/0                          display        NVIDIA Corporation
    /0/0/0/10/0.1                        multimedia     NVIDIA Corporation
    /0/0/0/10/0.2                        bus            NVIDIA Corporation
    /0/0/0/10/0.2/0      usb9            bus            xHCI Host Controller
    /0/0/0/10/0.2/1      usb10           bus            xHCI Host Controller
    /0/0/0/10/0.3                        bus            NVIDIA Corporation
    /0/13                                generic        Intel Corporation
    /0/14                                generic        Sky Lake-E RAS Configuration Registers
    /0/18                                generic        Intel Corporation
    /0/19                                generic        Intel Corporation
    /0/1a                                generic        Intel Corporation
    /0/1b                                generic        Intel Corporation
    /0/1c                                generic        Intel Corporation
    /0/a.2                               generic        Intel Corporation
    /0/a.3                               generic        Intel Corporation
    /0/a.4                               generic        Intel Corporation
    /0/a.5                               generic        Intel Corporation
    /0/a.6                               generic        Intel Corporation
    /0/a.7                               generic        Intel Corporation
    /0/b                                 generic        Intel Corporation
    /0/b.1                               generic        Intel Corporation
    /0/b.2                               generic        Intel Corporation
    /0/b.3                               generic        Intel Corporation
    /0/c                                 generic        Intel Corporation
    /0/c.1                               generic        Intel Corporation
    /0/c.2                               generic        Intel Corporation
    /0/c.3                               generic        Intel Corporation
    /0/c.4                               generic        Intel Corporation
    /0/c.5                               generic        Intel Corporation
    /0/c.6                               generic        Intel Corporation
    /0/c.7                               generic        Intel Corporation
    /0/d                                 generic        Intel Corporation
    /0/d.1                               generic        Intel Corporation
    /0/d.2                               generic        Intel Corporation
    /0/d.3                               generic        Intel Corporation
    /0/5                                 generic        Intel Corporation
    /0/5.2                               generic        Sky Lake-E RAS Configuration Registers
    /0/5.4                               generic        Intel Corporation
    /0/12                                generic        Sky Lake-E M3KTI Registers
    /0/12.1                              generic        Sky Lake-E M3KTI Registers
    /0/12.2                              generic        Sky Lake-E M3KTI Registers
    /0/15                                generic        Sky Lake-E M2PCI Registers
    /0/16                                generic        Sky Lake-E M2PCI Registers
    /0/16.4                              generic        Sky Lake-E M2PCI Registers
    /0/17                                generic        Sky Lake-E M2PCI Registers
    /0/1f                scsi3           storage
    /0/1f/0.0.0          /dev/sda        disk           8001GB ST8000DM004-2CX1
    /0/20                scsi5           storage
    /0/20/0.0.0          /dev/sdb        disk           8001GB ST8000DM004-2CX1
    /0/21                scsi7           storage
    /0/21/0.0.0          /dev/sdc        disk           8001GB ST8000DM004-2CX1
    /1                                   power          To Be Filled By O.E.M.
    
    bug help wanted 
    opened by DavidMChan 22
  • Add an example of usage with docker (and k8s)

    Add an example of usage with docker (and k8s)

    Problem

    I don't have access to the machines where my applications are running, they run in the "cloud", I can just deploy other containers

    Solution

    Deploy a container with the docker socket mounted to monitor the containers

    Alternatives

    No idea in mind

    Additional context

    It's nowaday's use case for production.

    documentation enhancement help wanted 
    opened by jdrouet 21
  • Include containerd-specific labels to data coming from powercaprapl sensor

    Include containerd-specific labels to data coming from powercaprapl sensor

    Problem

    Making dashboard for kubernetes and docker-compose use cases may be a bit tedious as we can only filter processes by exe or cmdline to get the power consumption of a project or a given application (when composed of multiple containers).

    Solution

    We could discuss with containerd to get information about the containers running and label them according to projects or docker-compose services.

    Alternatives

    Using exclusively containerd to do that would be great as it is the core of both docker and kubernetes. However, we may have to discuss with the docker daemon itself or kubernetes API to actually get important information. Let's see how it goes.

    Example: docker-compose-service=my_super_project or helm-app=my_awesome_project would be interessting. This FR is actually an exploratory one and may lead to more FRs to precise each use case. Please feel free to jump on it and talk about the use case you'd be the more interested in.

    enhancement help wanted 
    opened by bpetit 16
  • scaphandre doesn't work on AMD Zen

    scaphandre doesn't work on AMD Zen

    Bug description

    Trrying to get scaphandre running on AMD Zen (Ryzen 5 Pro 2500U) results in thread panic.

    To Reproduce

    • Install msr-tools
    • run scaphandre stdout -t 15

    Output:

    root@host:~# ./scaphandre stdout -t 15
    thread 'main' panicked at 'Couldn't find intel_rapl modules.', src/sensors/powercap_rapl.rs:72:13
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

    Expected behavior

    scaphandre should work as AMD RAPL support was added to kernel 5.8 and perf seems to return sensible data:

    root@host:~# perf stat -a --per-socket -I 1000 -e power/energy-pkg/
    #           time socket cpus             counts   unit events
         1.001342541 S0        1               2.06 Joules power/energy-pkg/
         2.002912211 S0        1               2.40 Joules power/energy-pkg/
         3.004453609 S0        1               1.87 Joules power/energy-pkg/
         3.837946645 S0        1               2.04 Joules power/energy-pkg/
    

    Environment

    • Debian Buster
    • 5.9.15 (buster-backports)

    Thank you again for creating scaphandre and please do let me know if I can help test this further. Cheers.

    bug 
    opened by barnumbirr 13
  • thread 'main' panicked at 'Couldn't find intel_rapl modules.' on debian

    thread 'main' panicked at 'Couldn't find intel_rapl modules.' on debian

    Bug description

    Unable to start scaphandre

    To Reproduce

    docker run -v /sys/class/powercap:/sys/class/powercap -v /proc:/proc -e RUST_BACKTRACE=full -ti hubblo/scaphandre stdout -t 15

    Expected behavior

    The container starts and write data on stdout Screenshots

    thread 'main' panicked at 'Couldn't find intel_rapl modules.', src/sensors/powercap_rapl.rs:72:13
    stack backtrace:
       0:     0x5597fe40581a - std::backtrace_rs::backtrace::libunwind::trace::h72c2fb8038f1bbee
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96
       1:     0x5597fe40581a - std::backtrace_rs::backtrace::trace_unsynchronized::h1e3b084883f1e78c
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/../../backtrace/src/backtrace/mod.rs:66
       2:     0x5597fe40581a - std::sys_common::backtrace::_print_fmt::h3bf6a7ebf7f0394a
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:79
       3:     0x5597fe40581a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2e8cb764b7fe02e7
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:58
       4:     0x5597fe247eac - core::fmt::write::h7a1184eaee6a8644
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/fmt/mod.rs:1080
       5:     0x5597fe404ed1 - std::io::Write::write_fmt::haeeb374d93a67eac
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/io/mod.rs:1516
       6:     0x5597fe4047cb - std::sys_common::backtrace::_print::h1d14a7f6ad632dc8
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:61
       7:     0x5597fe4047cb - std::sys_common::backtrace::print::h301abac8bb2e3e81
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:48
       8:     0x5597fe4047cb - std::panicking::default_hook::{{closure}}::hde0cb80358a6920a
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:208
       9:     0x5597fe4047cb - std::panicking::default_hook::h9b1a691049a0ec8f
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:227
      10:     0x5597fe4047cb - std::panicking::rust_panic_with_hook::h2bdec87b60580584
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:577
      11:     0x5597fe3f5ec3 - std::panicking::begin_panic::{{closure}}::h5d96da62289ff715
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:506
      12:     0x5597fe3f5e9c - std::sys_common::backtrace::__rust_end_short_backtrace::hb256569b5c3cbfe0
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:153
      13:     0x5597fe3b308a - std::panicking::begin_panic::hadf109fd9be01ce1
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:505
      14:     0x5597fe3eb68a - <scaphandre::sensors::powercap_rapl::PowercapRAPLSensor as scaphandre::sensors::Sensor>::generate_topology::h869517b2dbd7c71d
                                   at /app/src/sensors/powercap_rapl.rs:72
      15:     0x5597fe3ebf47 - <scaphandre::sensors::powercap_rapl::PowercapRAPLSensor as scaphandre::sensors::Sensor>::get_topology::h1040dc885fedd540
                                   at /app/src/sensors/powercap_rapl.rs:112
      16:     0x5597fe355ef4 - scaphandre::exporters::stdout::StdoutExporter::new::h8a54684990fe59de
                                   at /app/src/exporters/stdout.rs:51
      17:     0x5597fe355ef4 - scaphandre::run::hf55fdcee5038083e
                                   at /app/src/lib.rs:60
      18:     0x5597fe184e43 - scaphandre::main::h6f1f01f23d78ccc7
                                   at /app/src/main.rs:92
      19:     0x5597fe4016d3 - core::ops::function::FnOnce::call_once::h2d5aac1dbac46353
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:227
      20:     0x5597fe4016d3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8f018f9477126d9a
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:137
      21:     0x5597fe1852e5 - main
      22:     0x7fc662e98cb2 - __libc_start_main
      23:     0x5597fe18109a - _start
      24:                0x0 - <unknown>
    

    Environment

    • Linux distribution version
    lsb_release -a
    No LSB modules are available.
    Distributor ID:	Debian
    Description:	Debian GNU/Linux 9.12 (stretch)
    Release:	9.12
    Codename:	stretch
    
    • Kernel version
    $ uname -r
    4.9.0-12-amd64
    

    I have already tried the solution you gave to #59 but I still have an issue when I try to install linux-modules-extra packages and I have the following issue :

    sudo apt install linux-modules-extra-$(uname -r)
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package linux-modules-extra-4.9.0-12-amd64
    E: Couldn't find any package by glob 'linux-modules-extra-4.9.0-12-amd64'
    E: Couldn't find any package by regex 'linux-modules-extra-4.9.0-12-amd64'
    
    bug 
    opened by maximeperrault 12
  • Migrate to procfs 0.12.0

    Migrate to procfs 0.12.0

    Problem

    Procfs 0.9.0 includes breaking changes compared to 0.8.1: https://github.com/eminence/procfs/releases/tag/v0.9.0

    Solution

    Adapt the powercap rapl sensor to be able to keep up with the procfs upstream.

    enhancement help wanted 
    opened by bpetit 12
  • feat: add json reporter

    feat: add json reporter

    Add JSON reporter.

    You can use the following options:

    • -t to customize the timeout
    • -s to customize the interval
    • -f to change the destination file where to write the report

    If no file is provided, then the JSON is displayed in the console. If the directory where to create the file does not exist it will fail.

    TODO:

    • interval should be in milliseconds or should at least allows sending float number.
    • documentation
    opened by wallet77 12
  • Prometheus exporter: glitch happen with systemd process power consumption

    Prometheus exporter: glitch happen with systemd process power consumption

    Bug description

    Glitch of unreal power consumption happen sometimes. Seems to be related specifically to systemd.

    To Reproduce

    No specific procedure to reproduce. Run the prometheus exporter for quite a long time and hope you are lucky,.

    Expected behavior

    Screenshots

    2020-11-27_11-00

    Environment

    • OS: GNU/Linux 5.4.0-54-generic Ubuntu 20.04.1

    Additional context

    bug 
    opened by bpetit 12
  • thread 'main' panicked at 'Couldn't find intel_rapl modules.'

    thread 'main' panicked at 'Couldn't find intel_rapl modules.'

    Bug description

    Unable to start scaphandre

    To Reproduce

    docker run -v /sys/class/powercap:/sys/class/powercap -v /proc:/proc -e RUST_BACKTRACE=full -ti hubblo/scaphandre stdout -t 15
    

    Expected behavior

    The container starts and write data on stdout

    Screenshots

    thread 'main' panicked at 'Couldn't find intel_rapl modules.', src/sensors/powercap_rapl.rs:72:13
    stack backtrace:
       0:     0x5604d03f429a - std::backtrace_rs::backtrace::libunwind::trace::h72c2fb8038f1bbee
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96
       1:     0x5604d03f429a - std::backtrace_rs::backtrace::trace_unsynchronized::h1e3b084883f1e78c
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/../../backtrace/src/backtrace/mod.rs:66
       2:     0x5604d03f429a - std::sys_common::backtrace::_print_fmt::h3bf6a7ebf7f0394a
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:79
       3:     0x5604d03f429a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2e8cb764b7fe02e7
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:58
       4:     0x5604d02559cc - core::fmt::write::h7a1184eaee6a8644
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/fmt/mod.rs:1080
       5:     0x5604d03f3951 - std::io::Write::write_fmt::haeeb374d93a67eac
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/io/mod.rs:1516
       6:     0x5604d03f324b - std::sys_common::backtrace::_print::h1d14a7f6ad632dc8
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:61
       7:     0x5604d03f324b - std::sys_common::backtrace::print::h301abac8bb2e3e81
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:48
       8:     0x5604d03f324b - std::panicking::default_hook::{{closure}}::hde0cb80358a6920a
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:208
       9:     0x5604d03f324b - std::panicking::default_hook::h9b1a691049a0ec8f
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:227
      10:     0x5604d03f324b - std::panicking::rust_panic_with_hook::h2bdec87b60580584
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:577
      11:     0x5604d03d7a73 - std::panicking::begin_panic::{{closure}}::h1c5ca4054bfcced4
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:506
      12:     0x5604d03d7a4c - std::sys_common::backtrace::__rust_end_short_backtrace::hdf2e24f90f64c859
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:153
      13:     0x5604d038ef1a - std::panicking::begin_panic::h911c93aa12195ab2
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:505
      14:     0x5604d03cb8c2 - <scaphandre::sensors::powercap_rapl::PowercapRAPLSensor as scaphandre::sensors::Sensor>::generate_topology::hc322b9f765cb7099
                                   at /app/src/sensors/powercap_rapl.rs:72
      15:     0x5604d03cc2a7 - <scaphandre::sensors::powercap_rapl::PowercapRAPLSensor as scaphandre::sensors::Sensor>::get_topology::h7ceb1ed47b7fd14f
                                   at /app/src/sensors/powercap_rapl.rs:112
      16:     0x5604d018ff42 - scaphandre::exporters::stdout::StdoutExporter::new::he1ab57086641bd51
                                   at /app/src/exporters/stdout.rs:51
      17:     0x5604d018ff42 - scaphandre::run::hec5d090badbd7be0
                                   at /app/src/lib.rs:60
      18:     0x5604d018ff42 - scaphandre::main::h9d3de27ff1861588
                                   at /app/src/main.rs:90
      19:     0x5604d03f0ac3 - core::ops::function::FnOnce::call_once::h72eaaae983a9915d
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:227
      20:     0x5604d03f0ac3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8b70d5c3e456bdd5
                                   at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys_common/backtrace.rs:137
      21:     0x5604d0190f05 - main
      22:     0x7f34e5688cb2 - __libc_start_main
      23:     0x5604d018b09a - _start
      24:                0x0 - <unknown>
    

    Environment

    • Linux distribution version
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 20.04.1 LTS
    Release:        20.04
    Codename:       focal
    
    • Kernel version
    $ uname -r
    5.4.0-62-generic
    

    Additional context

    Proc reference : https://ark.intel.com/content/www/fr/fr/ark/products/87038/intel-xeon-processor-d-1520-6m-cache-2-20-ghz.html

    bug 
    opened by frntn 11
  • Selinux compliance

    Selinux compliance

    Bug description

    Scaphandre doesn't provide selinux module to be granted, so scaphandre is not supposed able to reach /proc files

    To Reproduce

    Run podman scaphandre on a CentOS node with Selinux permissive or enforced.

    Expected behavior

    type=PROCTITLE` msg=audit(1620219205.083:466054): proctitle=2F7573722F6C6F63616C2F62696E2F7363617068616E6472650070726F6D657468657573 type=AVC msg=audit(1620219205.085:466055): avc: denied { getattr } for pid=4193349 comm="actix-rt:worker" path="/proc/958137" dev="proc" ino=18576650 scontext=system_u:system_r:container_t:s0:c118,c962 tcontext=system_u:system_r:svirt_t:s0:c589,c604 tclass=dir permissive=1 type=SYSCALL msg=audit(1620219205.085:466055): arch=c000003e syscall=332 success=yes exit=0 a0=ffffffffffffff9c a1=7f215c0c5530 a2=0 a3=fff items=0 ppid=4193337 pid=4193349 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=6 comm="actix-rt:worker" exe="/usr/local/bin/scaphandre" subj=system_u:system_r:container_t:s0:c118,c962 key=(null)ARCH=x86_64 SYSCALL=statx AUID="root" UID="root" GID="root" EUID="root" SUID="root" FSUID="root" EGID="root" SGID="root" FSGID="root" type=PROCTITLE msg=audit(1620219205.085:466055): proctitle=2F7573722F6C6F63616C2F62696E2F7363617068616E6472650070726F6D657468657573 type=AVC msg=audit(1620219205.086:466056): avc: denied { getattr } for pid=4193349 comm="actix-rt:worker" path="/proc/2826870" dev="proc" ino=46793641 scontext=system_u:system_r:container_t:s0:c118,c962 tcontext=system_u:system_r:udev_t:s0-s0:c0.c1023 tclass=dir permissive=1 type=SYSCALL msg=audit(1620219205.086:466056): arch=c000003e syscall=332 success=yes exit=0 a0=ffffffffffffff9c a1=7f215c08c900 a2=0 a3=fff items=0 ppid=4193337 pid=4193349 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=6 comm="actix-rt:worker" exe="/usr/local/bin/scaphandre" subj=system_u:system_r:container_t:s0:c118,c962 key=(null)ARCH=x86_64 SYSCALL=statx AUID="root" UID="root" GID="root" EUID="root" SUID="root" FSUID="root" EGID="root" SGID="root" FSGID="root" type=PROCTITLE msg=audit(1620219205.086:466056): proctitle=2F7573722F6C6F63616C2F62696E2F7363617068616E6472650070726F6D657468657573 type=AVC msg=audit(1620219215.063:466057): avc: denied { search } for pid=4193349 comm="actix-rt:worker" name="1760" dev="proc" ino=21084 scontext=system_u:system_r:container_t:s0:c118,c962 tcontext=system_u:system_r:systemd_logind_t:s0 tclass=dir permissive=1 type=SYSCALL msg=audit(1620219215.063:466057): arch=c000003e syscall=257 success=yes exit=20 a0=ffffff9c a1=7f215c1d0af0 a2=80000 a3=0 items=1 ppid=4193337 pid=4193349 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=6 comm="actix-rt:worker" exe="/usr/local/bin/scaphandre" subj=system_u:system_r:container_t:s0:c118,c962 key=(null)ARCH=x86_64 SYSCALL=openat AUID="root" UID="root" GID="root" EUID="root" SUID="root" FSUID="root" EGID="root" SGID="root" FSGID="root" type=PATH msg=audit(1620219215.063:466057): item=0 name="/proc/1760/status" inode=29092 dev=00:04 mode=0100444 ouid=0 ogid=0 rdev=00:00 obj=system_u:system_r:systemd_logind_t:s0 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0OUID="root" OGID="root" type=PROCTITLE msg=audit(1620219215.063:466057): proctitle=2F7573722F6C6F63616C2F62696E2F7363617068616E6472650070726F6D657468657573 type=AVC msg=audit(1620219215.081:466058): avc: denied { getattr } for pid=4193349 comm="actix-rt:worker" path="/proc/1760" dev="proc" ino=21084 scontext=system_u:system_r:container_t:s0:c118,c962 tcontext=system_u:system_r:systemd_logind_t:s0 tclass=dir permissive=1 type=SYSCALL msg=audit(1620219215.081:466058): arch=c000003e syscall=332 success=yes exit=0 a0=ffffffffffffff9c a1=7f215c0a5590 a2=0 a3=fff items=0 ppid=4193337 pid=4193349 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=6 comm="actix-rt:worker" exe="/usr/local/bin/scaphandre" subj=system_u:system_r:container_t:s0:c118,c962 key=(null)ARCH=x86_64 SYSCALL=statx AUID="root" UID="root" GID="root" EUID="root" SUID="root" FSUID="root" EGID="root" SGID="root" FSGID="root"

    Environment

    CentOS Linux release 8.3.2011 4.18.0-240.10.1.el8_3.x86_64

    Additional context

    I'm using scaphandre in OpenStack Victoria context.

    documentation good first issue help wanted 
    opened by clopnis 10
  • Consistently reports 0 W for DRAM consumption

    Consistently reports 0 W for DRAM consumption

    Bug description

    Scaphandre reports 0 W as the DRAM consumption.

    Expected behavior

    I hoped scaphandre would include DRAM measurements.

    Screenshots

    Screenshot-2021-05-07T09:09:55

    Screenshot-2021-05-07T09:27:00

    Environment

    • Linux distribution version: Ubuntu 20.04.2
    • Kernel version: 5.4.0-67-generic
    • CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
    • Scaphandre version: a7b0159ce5135e2b25fe4c97a86434d30f6e0982 (self-built). Also tried pre-built docker image.

    Additional context

    I realize that this may very well be the intended behavior, and not a bug (e.g. because the Intel RAPL sensor or powercap doesn't output RAM for this CPU make). I was mainly hoping to get clarifications into this - if it's something I will be able to fix (maybe I'm just operating scaphandre wrong or am missing something silly?), or if it's just the way it is. Thank you for having written this really useful tool!

    Also, could it simply be because the memory usage is low, i.e. around 1GB used with 11GB buff/cached?

    root@Ubuntu-2004-focal-64-minimal ~ # free -m
                  total        used        free      shared  buff/cache   available
    Mem:          31900        1381       19428         140       11090       29945
    Swap:         16366           0       16366
    
    bug good first issue help wanted 
    opened by wanecek 9
  • Not able to install using kubernetes

    Not able to install using kubernetes

    Bug description

    Not able to install using kubernetes/helm.

    To Reproduce

    1. I am following https://hubblo-org.github.io/scaphandre-documentation/tutorials/kubernetes.html
    2. helm install scaphandre helm/scaphandre is giving following error Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"

    Expected behavior

    scaphandre should get installed

    Environment

    minikube version: v1.28.0 Ubuntu 22.04.1 LTS $ uname -r 5.15.0-1026-aws Client: Docker Engine - Community Version: 20.10.22

    bug 
    opened by deepakagra 2
  • Remove duplicated code in warp 10 exporter

    Remove duplicated code in warp 10 exporter

    Context

    While working on #92, I found some duplicated code in the warp 10 exporter.

    As far as I understand, scaph_self_cpu_usage_percent is send twice to warp 10.

    opened by papey 0
  • Integration with microk8s prometheus

    Integration with microk8s prometheus

    Hi! I am using scaphandre in a microk8s cluster and for the installation I am using your guide. In said guide the way to install prometheus is using the prometheus-community helm chart, but as I am using microk8s I have access to the prometheus addon that I can enable by just typing the command: microk8s enable prometheus, is there a way to connect scaphandre with that prometheus? By default I think that the helm chart for scaphandre looks for the prometheus community chart.

    The reason why I want to do this is because the prometheus-community chart is missing some metrics, like for example container_cpu_usage_seconds_total and I don't know why, while the microk8s addon has all the metrics I'm looking for.

    Thank you very much in advance!

    opened by FranciscoSedeno 8
  • build(deps): bump clap from 2.33.3 to 4.0.26

    build(deps): bump clap from 2.33.3 to 4.0.26

    Bumps clap from 2.33.3 to 4.0.26.

    Release notes

    Sourced from clap's releases.

    v4.0.26

    [4.0.26] - 2022-11-16

    Fixes

    • (error) Fix typos in ContextKind::as_str

    v4.0.25

    [4.0.25] - 2022-11-15

    Features

    • (error) Report available subcommands when required subcommand is missing

    v4.0.24

    [4.0.24] - 2022-11-14

    Fixes

    • Avoid panic when printing an argument that isn't built

    v4.0.23

    [4.0.23] - 2022-11-11

    Fixes

    • Don't panic on reporting invalid-long errors when followed by invalid UTF8
    • (help) Clarified argument to help subcommand

    v4.0.22

    [4.0.22] - 2022-11-07

    Fixes

    • (help) Don't overflow into next-line-help early due to stale (pre-v4) padding calculations

    v4.0.21

    [4.0.21] - 2022-11-07

    Features

    • (derive) long_about and long_help attributes, without a value, force using doc comment (before it wouldn't be set if there wasn't anything different than the short help)

    v4.0.20

    [4.0.20] - 2022-11-07

    Fixes

    • (derive) Allow defaulted value parser for '()' fields

    ... (truncated)

    Changelog

    Sourced from clap's changelog.

    [4.0.26] - 2022-11-16

    Fixes

    • (error) Fix typos in ContextKind::as_str

    [4.0.25] - 2022-11-15

    Features

    • (error) Report available subcommands when required subcommand is missing

    [4.0.24] - 2022-11-14

    Fixes

    • Avoid panic when printing an argument that isn't built

    [4.0.23] - 2022-11-11

    Fixes

    • Don't panic on reporting invalid-long errors when followed by invalid UTF8
    • (help) Clarified argument to help subcommand

    [4.0.22] - 2022-11-07

    Fixes

    • (help) Don't overflow into next-line-help early due to stale (pre-v4) padding calculations

    [4.0.21] - 2022-11-07

    Features

    • (derive) long_about and long_help attributes, without a value, force using doc comment (before it wouldn't be set if there wasn't anything different than the short help)

    [4.0.20] - 2022-11-07

    Fixes

    • (derive) Allow defaulted value parser for '()' fields

    [4.0.19] - 2022-11-04

    Features

    • ColorChoice now implements ValueEnum

    [4.0.18] - 2022-10-20

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Wrong watt consumptions

    Wrong watt consumptions

    Bug description

    First of all, thanks for sharing this tool !

    I've deployed the last version on k3S with no pb. Then i have imported the scaphandre dashboard from grafana.com, using its ID : It works fine, i have data displayed but the watt consumption are too low compared to the measure i do with my wattmeter. I mesure 34w on my device when grafana displays 12 to 15w.

    Expected behavior

    Calculate the right watt consumption.

    Environment

    • Linux distribution 22.04
    • Kernel version 5.15.0-53-generic
    • containerd://1.6.8-k3s1
    • k3s v1.24.7+k3s1

    Mini server : DELL Optiplex processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 94 model name : Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz

    bug 
    opened by CracKOl 2
Releases(v0.4.1)
  • v0.4.1(Oct 5, 2021)

  • v0.4.0(Oct 5, 2021)

    Added

    • Riemann exporter now supports mTLS: #103 thanks @uggla !
    • --containers option, in prometheus exporter, tells scaphandre to add labels to metrics related to a docker container or a kubernetes pod, to make getting metrics of a distributed application easier: #84 thanks @rossf7 for the tests, feedbacks, helm configuration and thanks @uggla for the reviews !
    • stdout exporter now allows to choose the number of processes to watch, with the --process-number flag and to filter processes watched thanks to a regex, with the --regex-filter option: #98, thanks @uggla !
    • MetricGenerator includes timestamp in Metrics now : #113

    Fixed

    • Added Cargo.lock to the repository: #111
    • Ensured domains names are feteched properly in any case : #114 thanks @PierreRust !

    Changed

    • Manipulating flags as a Vec of clap::Arg instead of a HashMap of ExporterOption in exporters: #100, thanks @uggla !
    • Json and Stdout exporters are now using MetricGenerator as an inteface to get metrics properly : #113
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Apr 13, 2021)

    Added

    • New MetricGenerator and Metric structs and helper functions to make writing exporters easier. Riemann and Prometheus exporters now share the same code pattern: #79 thanks @uggla !
    • New Warp10 exporter ! #76
    • Updated riemann_client and protobuf crates dependencies #70 thanks @uggla !
    • Successfully tested on AMD CPUs (AMD Ryzen 5 2600X): #55 (requires a kernel 5.11 or later) thanks @barnumbirr and @kamaradclimber !
    • Scaphandre can now be tested locally thanks to a docker-compose stack ! #61 thanks @PierreRust !
    • Added a CITATION file for references: #95 thanks @tstrempel !

    Fixed

    • Allowing scaphandre to run even if intel_rapl modules are not found: #65 (needed to run scaphandre on AMD CPUs)
    • Fixed typos and lacks in the documentation: #81, #77, #80 thanks @pierreozoux, @LudovicRousseau, @maethor, @wallet77
    • Moved documentation output to another repository: #94 (documentation is now available here: https://hubblo-org.github.io/scaphandre-documentation)
    • Json exporter has been refactored: #87 thanks @jdrouet !
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Feb 12, 2021)

    Added

    • Docker image (hubblo/scaphandre), ubuntu based: #48, thanks @rossf7
    • Helm chart to run scaphandre as a DaemonSet in a kubernetes cluster: #72 - thanks @rossf7
    • JsonExporter, to get metrics in JSON either in stdout or files: #68 - thanks @wallet77
    • RiemannExporter, to send metrics to Riemann monitoring tool: #58 - thanks @uggla
    • --qemu flag on PrometheusExporter, to add a "vmname" label to metrics related to processes that represent qemu-kvm virtual machines: #41 - thanks @uggla
    • Better documentation structure (based on divio's documentation framework and mdbook): #45, result here: https://hubblo-org.github.io/scaphandre/
    • Automated CI tests including cargo test --all, running on a (bare metal) machine: #62

    Fixed

    • Improved QemuExporter documentation: #42 - thanks @uggla
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Dec 22, 2020)

    [0.1.1]

    Added

    • -s, --step option added by @Uggla, to specify time step between two measurements, when using StdoutExporter

    Removed

    • removed energy_records_to_power_record function from src/sensors/mod.rs. get_records_diff_power_microwatts functions from Topology and CPUSocket should be used instead

    Fixed

    • README typos and misusage of english fixed by @Uggla and @florimondmanca
    • @Uggla made init.sh script more robust
    • cleaning of internal structs (records, cpustat, processes) was buggy, it is fixed
    • linux kernels < 5, on intel CPUs (>2012) may me measurable now (fixed kernel modules names check)
    Source code(tar.gz)
    Source code(zip)
    checksum(104 bytes)
    scaphandre-v0.1.1-Ubuntu_20.04-x86_64.gz(11.96 MB)
  • v0.1.0(Dec 8, 2020)

Owner
Hubblo
Shrink the environmental footprint of your digital services.
Hubblo
TAT agent is an agent written in Rust, which run in CVM or Lighthouse instances.

TAT agent is an agent written in Rust, which run in CVM, Lighthouse or CPM 2.0 instances. Its role is to run commands remotely without ssh login, invoked from TencentCloud Console/API. Commands include but not limited to: Shell, PowerShell, Python. TAT stands for TencentCloud Automation Tools. See more info at https://cloud.tencent.com/product/tat.

Tencent 97 Dec 21, 2022
🔍 Fully-featured metrics collection agent for First Tech Challenge competitions. Supports Prometheus.

Scout Scout is a fully-featured free and open source metrics collector for FTC competitions. The project is licensed under the GNU LGPLv3 license. Fea

hivemind 3 Oct 24, 2023
⏱ Cross-platform Prometheus style process metrics collector of metrics crate

⏱ metrics-process This crate provides Prometheus style process metrics collector of metrics crate for Linux, macOS, and Windows. Collector code is man

Alisue 12 Dec 16, 2022
Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.

Valheim Docker If you are looking for a guide on how to get started click here Mod Support! It is supported to launch the server with BepInEx but!!!!!

Michael 657 Dec 30, 2022
.NET PhysX 5 binding to all platforms(win, osx, linux) for 3D engine, deep learning, dedicated server of gaming.

MagicPhysX .NET PhysX 5 binding to all platforms(win-x64, osx-x64, osx-arm64, linux-x64, linux-arm64) for 3D engine, deep learning, dedicated server o

Cysharp, Inc. 37 Jul 4, 2023
RustRedOps is a repository dedicated to gathering and sharing advanced techniques and malware for Red Team, with a specific focus on the Rust programming language. (In Construction)

RustRedOps In Construction.... The project is still under development Overview RustRedOps is a repository that houses various tools and projects relat

João Victor 17 Dec 14, 2023
Cli tool for git productivity written in Rust and packaged for consumption via NPM

crust ?? cli tool for git productivity written in Rust and packaged for consumption via NPM This repo is identical with @skyneticist/golee in terms of

null 2 Jul 30, 2022
Tool to monitor the statistics and the energy consumption of docker containers

Docker Activity Docker activity is a tool to monitor the statistics of your containers and output their energy consumption. Warning It's still in earl

Jérémie Drouet 39 Dec 6, 2022
TP - Optimization of the energy consumption of a Matrix Multiplication

Optimization de la consommation: Multiplication de matrices Nous allons travailler sur la multiplication de matrices denses. C’est un algorithme class

Bynawers 0 Mar 11, 2022
An API and test-app that exposes zcash functionality for app consumption

Zingolib This repo provides both a library for zingoproxyclient and zingo-mobile, as well as an included cli application to interact with zcashd via l

ZingoLabs 5 Dec 15, 2022
Raspberry Pi's CPU and GPU temperature exporter for Prometheus consumption.

Pi Temperature Exporter A simple application for collecting Raspberry Pi's CPU and GPU temperatures and exporting them for Prometheus consumption. Ins

Sergei 11 Mar 12, 2023
🛳 Continuous deployment agent

Subilo ?? Deployment automation agent Subilo is a tool to setup continuous deployments for applications running on machines with no external integrati

null 42 Jun 5, 2022
Agent library for Internet Computer, in Dart

An agent library built for Internet Computer, a plugin package for dart and flutter apps. Developers can build ones to interact with Dfinity's blockchain directly.

null 87 Dec 31, 2022
Akamai Krypton CLI and SSH Agent (v2)

Akamai "Krypton" FIDO2 SSH Agent and CLI The akr command line utility is Akamai's "Krypton" SSH Agent, the successor to kr which works exclusively wit

Akamai 57 Jan 4, 2023
Log agent to replay time-stamped log stream

replayman Log agent to replay time-stamped log stream. Getting started Installation cargo install replayman Prepare for your data TSV with a header li

SpringQL 3 Dec 23, 2022
This PAM module provides ssh-agent based authentication

PAM-RSSH This PAM module provides ssh-agent based authentication. The primary design goal is to avoid typing password when you sudo on remote servers.

Yuxiang Zhang 21 Dec 14, 2022
Rust library to detect bots using a user-agent string

Rust library to detect bots using a user-agent string

Bryan Morgan 8 Dec 21, 2022
Ingraind - a security monitoring agent built around RedBPF for complex containerized environments and endpoints.

ingraind is a security monitoring agent built around RedBPF for complex containerized environments and endpoints. The ingraind agent uses eBPF probes to provide safe and performant instrumentation for any Linux-based environment.

KingoOo 5 Apr 6, 2022
Multi-agent (path finding) planning framework

multi-agent (path finding) planning framework Mapf is a (currently experimental) Rust library for multi-agent planning, with a focus on cooperative pa

null 17 Dec 5, 2022
Vector is a high-performance, end-to-end (agent & aggregator) observability data pipeline that puts you in control of your observability data

Quickstart • Docs • Guides • Integrations • Chat • Download What is Vector? Vector is a high-performance, end-to-end (agent & aggregator) observabilit

Vector 12.1k Jan 2, 2023