posible auto sample size?
[cheali-logview-gnuplot] / logview-scope.sh
1 #!/bin/sh -xe
2
3 # .i3/config
4 # for_window[title="^Gnuplot"] floating enable
5
6 # http://users.softlab.ntua.gr/~ttsiod/gnuplotStreaming.html
7 test -x driveGnuPlots.pl || wget http://users.softlab.ntua.gr/~ttsiod/driveGnuPlots.pl && chmod 755 driveGnuPlots.pl
8
9 width=120
10 file=$1
11
12 test -z "$file" && file=`ls -t log/*.log | head -1`
13
14 echo "# using $width points from file $file"
15
16 #tail -f `ls -t log/*.log | head -1` \
17 cat $file \
18 | grep '$1' | cut -d\; -f \
19 4,5,6,\
20 10,11,\
21 12,13,14,15,16,17,\
22 18,19,20,21,22,23,\
23 24,25,26,27,28 \
24 | sed \
25 -e 's/^/0:/' \
26 -e 's/;/\n1:/' \
27 -e 's/;/\n2:/' \
28 -e 's/;/\n3:/' \
29 -e 's/;/\n4:/' \
30 -e 's/;/\n5:/' \
31 -e 's/;/\n6:/' \
32 -e 's/;/\n7:/' \
33 -e 's/;/\n8:/' \
34 -e 's/;/\n9:/' \
35 -e 's/;/\n10:/' \
36 -e 's/;/\n11:/' \
37 -e 's/;/\n12:/' \
38 -e 's/;/\n13:/' \
39 -e 's/;/\n14:/' \
40 -e 's/;/\n15:/' \
41 -e 's/;/\n16:/' \
42 -e 's/;/\n17:/' \
43 -e 's/;/\n18:/' \
44 -e 's/;/\n19:/' \
45 -e 's/;/\n20:/' \
46 -e 's/;/\n21:/' \
47 -e 's/;/\n22:/' \
48 | \
49 ./driveGnuPlots.pl 22 \
50 $width $width $width \
51 $width $width \
52 $width $width $width $width $width $width \
53 $width $width $width $width $width $width \
54 $width $width $width $width $width \
55 V mA mAh \
56 temp Vinput \
57 v1 v2 v3 v4 v5 v6 \
58 r1 r2 r3 r4 r5 r6 \
59 Rbat Rwire Z AA AB \
60 320x200+1200+500 \
61 320x200+1200+850 \
62 320x200+1200+1200 \
63 320x200+1550+500 \
64 320x200+1550+850 \
65 400x175+1900+450 \
66 400x175+1900+650 \
67 400x175+1900+850 \
68 400x175+1900+1050 \
69 400x100+1900+1250 \
70 400x100+1900+1400 \
71 400x175+2300+450 \
72 400x175+2300+650 \
73 400x175+2300+850 \
74 400x175+2300+1050 \
75 400x100+2300+1250 \
76 400x100+2300+1400 \
77 400x175+2700+450 \
78 400x175+2700+650 \
79 400x175+2700+850 \
80 400x175+2700+1050 \
81 400x175+2700+1250 \
82 2>/dev/null
83
84 # leave empty line bove this one
85