Introduction
Introduction Statistics Contact Development Disclaimer Help
Print to stderr. - energy - measure system energy usage
Log
Files
Refs
Tags
README
LICENSE
---
commit 94c96ddd16d2012cdaaef649903e8fcc663a9296
parent 33cf70dcdbb4ed08ba53d121d06a3c6904db9af7
Author: Troels Henriksen <[email protected]>
Date: Wed, 23 Aug 2023 12:26:11 +0200
Print to stderr.
Diffstat:
M energy.c | 2 +-
M man/energy.1 | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/energy.c b/energy.c
@@ -167,6 +167,6 @@ int main(int argc, char** argv) {
}
for (int i = 0; i < num_sensors; i++) {
- printf("%-8s %6.2f J\n", sensors[i].name, sensors[i].usage(sensors[i].data…
+ fprintf(stderr, "%-8s %6.2f J\n", sensors[i].name, sensors[i].usage(sensor…
}
}
diff --git a/man/energy.1 b/man/energy.1
@@ -17,7 +17,8 @@
.Nm
Show the energy usage of a command, similarly to how
.Xr time 1
-shows the time usage. The energy usage is reported in joules.
+shows the time usage. The energy usage is printed to stderr and
+reported in joules.
.Nm
automatically attempts to use whatever sensors are available.
Battery-based measurements are only used if the battery is
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.