GNU bug report logs -
#41150
[PATCH] gnu: Add powerstat.
Previous Next
Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>
Date: Sat, 9 May 2020 15:16:02 UTC
Severity: normal
Tags: patch
Done: Tobias Geerinckx-Rice <me <at> tobias.gr>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#41150: [PATCH] gnu: Add powerstat.
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 41150 <at> debbugs.gnu.org.
--
41150: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41150
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Mathieu again,
Mathieu Othacehe 写道:
> Hard-coding CC this way will prevent cross-compilation. You can
> have a
> look to "crda" or "libaio" for examples.
Do you happen to know why libaio specifies the full path to gcc
(only) when cross-compiling? I didn't bother modifying it to
test.
I cross-built powerstat for aarch64 on my laptop (then ran it by
accident -- modern GNU/Linux is mad). I'm not restricting
platforms (yet) since my knowledge of ACPI support outside of x86
does not exist.
Pushed as 510a8eb1b8b4f2686606e427b8965c126b81ed8a.
Thanks!
T G-R
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
* gnu/packages/linux.scm (powerstat): New public variable.
---
gnu/packages/linux.scm | 44 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d2bffe8d8c..0d558f0277 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1195,7 +1195,50 @@ at login. Local and dynamic reconfiguration are its key features.")
;;; Miscellaneous.
;;;
+(define-public powerstat
+ (package
+ (name "powerstat")
+ (version "0.02.22")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://kernel.ubuntu.com/~cking/tarballs/"
+ "powerstat/powerstat-" version ".tar.gz"))
+ (sha256
+ (base32 "0r355b9syqa2nhfy8ksvxyy5d58v0isf983842js091s6liy0x7g"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list "CC=gcc"
+ (string-append "prefix=" (assoc-ref %outputs "out")))
+ #:tests? #f ; no test suite
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'respect-$prefix
+ ;; https://bugs.launchpad.net/ubuntu/+source/powerstat/+bug/1877744
+ (lambda _
+ (substitute* "Makefile"
+ (("DIR=/usr/") "DIR=$(prefix)/"))
+ #t))
+ (delete 'configure)))) ; no configure script
+ (home-page "https://kernel.ubuntu.com/~cking/powerstat/")
+ (synopsis "Measure system power consumption")
+ (description
+ "Powerstat measures and reports your computer's power consumption in real
+time. On mobile PCs, it uses ACPI battery information to measure the power
+drain of the entire system.
+
+Powerstat can also report @acronym{RAPL, Running Average Power Limit} power
+domain measurements. These are available only on some hardware such as Intel
+Sandybridge and newer, and cover only part of the machine's components such as
+CPU, DRAM, and graphics. However, they provide accurate and immediate readings
+and don't require a battery at all.
+
+The output is like @command{vmstat} but also shows power consumption statistics:
+at the end of a run, @command{powerstat} will calculate the average, standard
+deviation, and minimum and maximum values. It can show a nice histogram too.")
+ (license license:gpl2)))
+
(define-public psmisc
(package
(name "psmisc")
--
2.26.2
This bug report was last modified 5 years and 73 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.