Package: battery-stats Version: 0.5.1-1 Severity: normal Running battery-graph:
~ # bash -x /usr/bin/battery-graph + set -e + prefix=/usr + libdir=/usr/share/battery-stats ++ getopt -o f:s:t:d:TAg:D --long from:,since:,to:,duration:,text,norate,title:,geometry:,display:,libdir: -n battery-graph -- + TEMP=' --' ++ date +%s --date=now + now=1478161748 + from=0 + to=0 + duration=0 + default_duration=10800 + text=false + SWITCH_RATE=true + title='Battery Graph' + eval set -- ' --' ++ set -- -- + true + case "$1" in + shift + break + '[' -z :0.0 ']' + '[' 0 -eq 0 ']' + '[' 0 -eq 0 ']' + '[' 0 -eq 0 ']' + duration=10800 + to=1478161748 + case "${from}:${duration}:${to}" in + from=1478150948 ++ TZ=UTC ++ date +%s --date=1/1/2000 ++ TZ=UTC ++ date +%s --date=1/1/1970 + adjustment=946684800 ++ date -u --date=12:00 +%s ++ date --date=12:00 +%s + utc_adjust=3600 + adjustment=946681200 + from2000=531469748 + to2000=531480548 ++ mktemp + TMPFILENAME=/tmp/tmp.UctS6HSC9N + battery-log ++ tail -n 1 /tmp/tmp.UctS6HSC9N ++ awk '{ print $1 }' + TIME_LAST_RECORD=1478161742 ++ awk 'BEGIN {last_status=-1} { if ($3!=last_status && $3==1) {tchange = $1} last_status=$3 } END {print (tchange)}' /tmp/tmp.UctS6HSC9N + TIME_LAST_DISCHARGE_BEGIN= + '[' '!' 1478161742 ']' ++ awk 'BEGIN {last_status=-1} { if ($3!=last_status && $3==2) {tchange = $1} last_status=$3 } END { if (tchange>) {print (tchange)} else {print 1478161742} }' /tmp/tmp.UctS6HSC9N awk: cmd. line:1: BEGIN {last_status=-1} { if ($3!=last_status && $3==2) {tchange = $1} last_status=$3 } END { if (tchange>) {print (tchange)} awk: cmd. line:1: ^ syntax error awk: cmd. line:2: else {print 1478161742} } awk: cmd. line:2: ^ syntax error + TIME_LAST_DISCHARGE_END= battery-log isn't empty, as shown by cat'ing the temporary file created by the battery-graph run above: ~ !1 # cat /tmp/tmp.UctS6HSC9N 1478160697 60.64 2 2016/11/03 09:11:37 - 1478161141 60.64 2 2016/11/03 09:19:01 - 1478161201 60.64 2 2016/11/03 09:20:01 - 1478161261 60.64 2 2016/11/03 09:21:01 - 1478161321 60.64 2 2016/11/03 09:22:01 - 1478161381 60.64 2 2016/11/03 09:23:01 - 1478161441 60.64 2 2016/11/03 09:24:01 - 1478161501 60.64 2 2016/11/03 09:25:01 - 1478161561 60.64 2 2016/11/03 09:26:01 - 1478161621 60.64 2 2016/11/03 09:27:02 - 1478161682 60.64 2 2016/11/03 09:28:02 - 1478161742 60.64 2 2016/11/03 09:29:02 - -- System Information: Debian Release: stretch/sid APT prefers oldoldstable APT policy: (500, 'oldoldstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386, armel Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: sysvinit (via /sbin/init) Versions of packages battery-stats depends on: pn gnuplot <none> ii gzip 1.6-5 pn libacpi0 <none> pn libapm1 <none> ii libc6 2.23-4 ii logrotate 3.8.7-2 battery-stats recommends no packages. battery-stats suggests no packages.