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

scaphandre: init at 0.5.0 #238462

Merged
merged 2 commits into from
Jun 26, 2023
Merged

scaphandre: init at 0.5.0 #238462

merged 2 commits into from
Jun 26, 2023

Conversation

gaelreyrol
Copy link
Contributor

@gaelreyrol gaelreyrol commented Jun 18, 2023

Description of changes

Scaphandre is an energy consumption metrology agent that supports various time series databases such as prometheus.

I deployed this package on three hosts to expose metrics to prometheus and it works fine, the only requirement is to have intel_rapl_common kernel module enable.

As it is a new package, it could be backported to 23.05.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Jun 18, 2023
dieHook
];
} ''
${scaphandre}/bin/scaphandre stdout -t 4 > $out || die "Scaphandre failed to measure consumption"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't you say you need intel_rapl_common? how is it supposed to work on non-Intel machines?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does, I thought that when building the package it was going through the tests. Should I extract it into a nixosTest ? According to the compatibility page, the sensor is available on Intel & AMD but I don't know how to handle that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a nixosTest to ensure kernel module intel_rapl_common is activated.

Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes, untested yet, but seems good.

@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Jun 25, 2023
@drupol drupol merged commit c7bb191 into NixOS:master Jun 26, 2023
@gaelreyrol gaelreyrol deleted the init-scaphandre branch June 26, 2023 17:41
mccurdyc pushed a commit to mccurdyc/nixpkgs that referenced this pull request Jul 3, 2023
* scaphandre: init at 0.5.0

* Update pkgs/servers/scaphandre/default.nix

---------

Co-authored-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants