From c8118181f3e6aeb156b13c75e7b9bfce530742b7 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 6 Jan 2021 02:53:12 +0100 Subject: gnu: Add tmon. * gnu/packages/linux.scm (tmon): New public variable. --- gnu/packages/linux.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'gnu/packages/linux.scm') diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index e69aeee28e..4b2adeabed 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -5364,6 +5364,52 @@ be installed and loaded separately. Only the original vendor firmware is supported.") (license license:gpl3+))) +(define-public tmon + (package + (name "tmon") + ;; Tmon's ‘VERSION = 1.0’ hasn't been touched since 2013; the code has. + (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 "INSTALL_ROOT=" (assoc-ref %outputs "out")) + "BINDIR=bin") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-subdirectory + (lambda _ + (chdir "tools/thermal/tmon") + #t)) + (add-after 'install 'install-man-page + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (man8 (string-append out "/share/man/man8"))) + (install-file "tmon.8" man8) + #t))) + (delete 'configure)))) ; no configure script + (inputs + `(("ncurses" ,ncurses))) + (home-page (package-home-page linux-libre)) + (synopsis "Monitor and test the Linux thermal subsystem in real time") + (description + "Tmon is a tool to interact with the complex thermal subsystem of the +kernel Linux. It helps visualize thermal relationships and real-time thermal +data, tune and test cooling devices and sensors, and collect thermal data for +further analysis. + +As computers become smaller and more thermally constrained, more sensors are +added and new cooling capabilities introduced. Thermal relationships can change +dynamically. Their complexity grows exponentially among cooling devices, zones, +sensors, and trip points. + +Linux exposes this relationship through @file{/sys/class/thermal} with a matrix +of symbolic links, trip point bindings, and device instances. To traverse it +by hand is no trivial task: @command{tmon} aims to make it understandable.") + (license license:gpl2))) + (define-public turbostat (package (name "turbostat") -- cgit v1.2.3