[feedgnuplot] 20/42: tweaked a recipe to use --timefmt

Dima Kogan dkogan-guest at alioth.debian.org
Sun Oct 20 08:04:05 UTC 2013


This is an automated email from the git hooks/post-receive script.

dkogan-guest pushed a commit to tag v1.25
in repository feedgnuplot.

commit 1252315598b6594c470da139f0ba47372d3dfd92
Author: Dima Kogan <dima at secretsauce.net>
Date:   Fri Oct 18 13:38:52 2013 -0700

    tweaked a recipe to use --timefmt
---
 bin/feedgnuplot |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/feedgnuplot b/bin/feedgnuplot
index f7c8dee..cbeb80a 100755
--- a/bin/feedgnuplot
+++ b/bin/feedgnuplot
@@ -1518,13 +1518,13 @@ Looks at wlan0 on Linux.
    gawk '/wlan0/ {if(b) {print $2-b; fflush()} b=$2}' |
    feedgnuplot --lines --stream --xlen 10 --ylabel 'Bytes/sec' --xlabel seconds
 
-=head2 Realtime plot of battery charge
+=head2 Realtime plot of battery charge in respect to time
 
 Uses the result of the C<acpi> command.
 
  $ while true; do acpi; sleep 15; done |
-   perl -nE 'BEGIN{ $| = 1; } /([0-9]*)%/; say join(" ", $./4, $1);' |
-   feedgnuplot --stream --ymin 0 --ymax 100 --domain --xlabel 'Time (seconds)' --ylabel "Battery charge (%)"
+   perl -nE 'BEGIN{ $| = 1; } /([0-9]*)%/; say join(" ", time(), $1);' |
+   feedgnuplot --stream --ymin 0 --ymax 100 --lines --domain --xlabel 'Time' --timefmt '%s' --ylabel "Battery charge (%)"
 
 =head2 Realtime plot of temperatures in an IBM Thinkpad
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/feedgnuplot.git



More information about the debian-science-commits mailing list