[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: Add turbostat.
From: |
guix-commits |
Subject: |
01/02: gnu: Add turbostat. |
Date: |
Tue, 5 Jan 2021 20:54:43 -0500 (EST) |
nckx pushed a commit to branch master
in repository guix.
commit acc87fae1307ee1f516783f024c7f362784daa39
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Wed Jan 6 02:14:42 2021 +0100
gnu: Add turbostat.
* gnu/packages/linux.scm (turbostat): New public variable.
---
gnu/packages/linux.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 71f21aa..e69aeee 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5364,6 +5364,45 @@ be installed and loaded separately. Only the original
vendor firmware is
supported.")
(license license:gpl3+)))
+(define-public turbostat
+ (package
+ (name "turbostat")
+ ;; XXX turbostat reports a version like ‘20.09.30’ but using it here would
+ ;; make it harder to benefit from ‘free’ linux-libre package updates.
+ (version (package-version linux-libre))
+ (source (package-source linux-libre))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no test suite
+ #:make-flags
+ (list (string-append "CC=" ,(cc-for-target))
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'enter-subdirectory
+ (lambda _
+ (chdir "tools/power/x86/turbostat")
+ #t))
+ (delete 'configure)))) ; no configure script
+ (inputs
+ `(("libcap" ,libcap)))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (home-page (package-home-page linux-libre))
+ (synopsis "Report x86 processor frequency and idle statistics")
+ (description
+ "Turbostat reports x86 processor topology, frequency, idle power state
+statistics, temperature, and power consumption. Some information is
unavailable
+on older processors.
+
+It can be used to identify machines that are inefficient in terms of power
usage
+or idle time, report the rate of @acronym{SMI, system management interrupt}s
+occurring on the system, or verify the effects of power management tuning.
+
+@command{turbostat} reads hardware counters but doesn't write to them, so it
+won't interfere with the OS or other running processes---including multiple
+invocations of itself.")
+ (license license:gpl2)))
+
(define-public ntfs-3g
(package
(name "ntfs-3g")