gnu: Add tmon.

* gnu/packages/linux.scm (tmon): New public variable.
This commit is contained in:
Tobias Geerinckx-Rice 2021-01-06 02:53:12 +01:00
parent acc87fae13
commit c8118181f3
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -5364,6 +5364,52 @@ (define-public tpacpi-bat
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")