From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wElbIljJtl6dJwAA0tVLHw (envelope-from ) for ; Sat, 09 May 2020 15:16:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6LZ4KWXJtl6HXAAA1q6Kng (envelope-from ) for ; Sat, 09 May 2020 15:16:53 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 071C99400BF for ; Sat, 9 May 2020 15:16:51 +0000 (UTC) Received: from localhost ([::1]:57332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXRDe-0000rq-PR for larch@yhetil.org; Sat, 09 May 2020 11:16:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXRCt-00008o-Bk for guix-patches@gnu.org; Sat, 09 May 2020 11:16:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXRCt-0001F1-17 for guix-patches@gnu.org; Sat, 09 May 2020 11:16:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jXRCs-0002Zc-Q5 for guix-patches@gnu.org; Sat, 09 May 2020 11:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41150] [PATCH] gnu: Add powerstat. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 May 2020 15:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41150 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41150@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15890373349813 (code B ref -1); Sat, 09 May 2020 15:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 May 2020 15:15:34 +0000 Received: from localhost ([127.0.0.1]:48237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXRCQ-0002Y9-76 for submit@debbugs.gnu.org; Sat, 09 May 2020 11:15:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:60278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXRCJ-0002Xm-QA for submit@debbugs.gnu.org; Sat, 09 May 2020 11:15:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXRCJ-0008DX-Kj for guix-patches@gnu.org; Sat, 09 May 2020 11:15:27 -0400 Received: from tobias.gr ([2a02:c205:2020:6054::1]:45628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXRCG-0000mV-L1 for guix-patches@gnu.org; Sat, 09 May 2020 11:15:27 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id 672a24ca for ; Sat, 9 May 2020 15:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=2018; i=me@tobias.gr; bh=ibtkyz4UNg2p9UKC7fGD8/0Fkh1/AfGLG1nM vA5GXH0=; b=EhMLRAYjw1jVpAfS6mACJKZogjRvQSnQn0+yWK1Ivlf3MzjfqQnD cbgT7bq6i/AbkZHcBfVUPwQDcN/ok2oBeScejcWLJ72wiYYyaz8IDxSGMz+bbpq5 WRdqVrDYEEn/Yu69HvUmHhmZAXAwH5yB553RQafD+C31siF4U6vbRqtvcjKXBDAh AgmHAhleVIVqoju4dxjRz6zS2OtyI+y4rlhSb2zK0pZxplfVRPewPn94c9htXr/n RJHs2agCZ7/3UU9wP3lo5sKTqaT7BDnFxgDdaWoFcPPRG0NWLzvkcKKHWAjpy78Z HSEGtIhwOCaGBJbSdIxaVDnEPwoQRPC2sg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 916d75ec (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sat, 9 May 2020 15:15:20 +0000 (UTC) Date: Sat, 9 May 2020 17:15:09 +0200 Message-Id: <20200509151509.11424-1-me@tobias.gr> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.4 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via X-Scanner: scn0 X-Spam-Score: 3.99 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=tobias.gr header.s=2018 header.b=EhMLRAYj; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [3.99 / 13.00]; HAS_REPLYTO(0.00)[me@tobias.gr]; GENERIC_REPUTATION(0.00)[-0.54022276545483]; DWL_DNSWL_BLOCKED(0.00)[209.51.188.17:from]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; R_MISSING_CHARSET(2.50)[]; TO_DN_NONE(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.09), country: US(-0.00), ip: 209.51.188.17(-0.54)]; R_DKIM_REJECT(1.00)[tobias.gr:s=2018]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; DKIM_TRACE(0.00)[tobias.gr:-]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[guix-patches@gnu.org,guix-patches-bounces@gnu.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[launchpad.net:url,ubuntu.com:url]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[gnu.org]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; RCVD_COUNT_SEVEN(0.00)[9]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: ZqzkCoNpkbTw * 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