-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathladelog.sh
478 lines (439 loc) · 15.9 KB
/
ladelog.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
#!/bin/bash
# s h ellcheck -x --exclude=SC2086 ladelog.sh 2>&1
# check if config file is already in env
if [[ -z $debug ]]; then
cd /var/www/html/openWB || exit 0
# shellcheck source=/var/www/html/openWB/openwb.conf
source loadconfig.sh
# ./helperFunctions.sh
openwbDebugLog()
{
shift; shift;
echo "$*"
}
openwbDebugLog "MAIN" 0 "Ladelog start"
fi
############### profiling Anf
ptx=0
pt=0
declare -F ptstart &>/dev/null || {
ptstart()
{
ptx=$(date +"%s%N")
ptx=$(( ptx / 1000 / 1000))
}
ptend()
{
local txt=${1:-}
local max=${2:-200}
local te
te=$(date +"%s%N")
te=$(( te / 1000 / 1000 ))
pt=$(( te - ptx))
if (( pt > max )) ; then
openwbDebugLog "DEB" 1 "TIME **** ${txt} needs $pt ms. (max:$max)"
openwbDebugLog "MAIN" 2 "TIME **** ${txt} needs $pt ms. (max:$max)"
#echo "TIME **** ${txt} needs $pt ms. (max:$max)"
fi
}
}
############### profiling End
ptstart
alog=""
monthlyfile="web/logging/data/ladelog/$(date +%Y%m).csv"
if [ ! -f "$monthlyfile" ]; then
openwbDebugLog "CHARGESTAT" 1 "create $monthlyfile"
echo "" >"$monthlyfile"
fi
#openwbDebugLog "CHARGESTAT" 1 "### start $monthlyfile"
readonly SOFORT0=0
readonly MINPV1=1
readonly NURPV2=2
readonly STOP3=3
readonly STANDBY4=4
readonly SUBMODE_NACHLADEN7=7
# ladeleistung , Summe aller LP's
read ladeleistung <ramdisk/llaktuell
read llkwh <ramdisk/llkwh
read soc <ramdisk/soc
read soc1 <ramdisk/soc1
read nachtladenstate <ramdisk/nachtladenstate
read nachtladen2state <ramdisk/nachtladen2state
read rfidlp1 <ramdisk/rfidlp1
rfidlp1=$( cut -d ',' -f 1 <<< "$rfidlp1" ) # Zeit vom Tag abtennen
read rfidlp2 <ramdisk/rfidlp2
rfidlp2=$( cut -d ',' -f 1 <<< "$rfidlp2" ) # Zeit vom Tag abtennen
read rfidlp3 <ramdisk/rfidlp3
rfidlp3=$( cut -d ',' -f 1 <<< "$rfidlp3" ) # Zeit vom Tag abtennen
read soc1KM <ramdisk/soc1KM
read soc2KM <ramdisk/soc2KM
read soc3KM <ramdisk/soc3KM
# read soc1Range <ramdisk/soc1Range
# read soc2Range <ramdisk/soc2Range
if (( nachtladenstate == 0 )) && (( nachtladen2state == 0 )); then # Weder Nachtladen (nachtladestate) noch Morgens laden (nachtladen2state) aktiv? nutze lademodus.
read lmodus <ramdisk/lademodus
else # Nachtladen oder Morgens laden ist aktiv, lademodus 7 setzen
lmodus=$SUBMODE_NACHLADEN7
fi
if [ -e ramdisk/loglademodus ]; then
read lademodus <ramdisk/loglademodus
loglademodus=$lademodus
fi
if (( soc > 0 )); then
soctext=", bei $soc %SoC"
else
soctext="."
fi
if (( soc1 > 0 )); then
soctext1=", bei $soc1 %SoC"
else
soctext1="."
fi
###################
#### LP1 ########
###################
read plugstat <ramdisk/plugstat
if (( plugstat == 1 )); then
alog="pluged "
read pluggedladungaktlp1 <ramdisk/pluggedladungaktlp1
if (( pluggedladungaktlp1 == 0 )); then
echo "$llkwh" > ramdisk/pluggedladunglp1startkwh
echo "1" > ramdisk/pluggedladungaktlp1
fi
if (( xstopchargeafterdisclp1 == 1 )); then
read boolstopchargeafterdisclp1 <ramdisk/boolstopchargeafterdisclp1
if (( boolstopchargeafterdisclp1 == 0 )); then
echo "1" > ramdisk/boolstopchargeafterdisclp1
fi
fi
read pluggedladunglp1startkwh <ramdisk/pluggedladunglp1startkwh
pluggedladungbishergeladen=$(echo "scale=2;($llkwh - $pluggedladunglp1startkwh)/1" |bc | sed 's/^\./0./')
echo "$pluggedladungbishergeladen" > ramdisk/pluggedladungbishergeladen
echo "0" > ramdisk/pluggedtimer1
else
alog="unpluged "
read pluggedtimer1 <ramdisk/pluggedtimer1
if (( pluggedtimer1 < 3 )); then
pluggedtimer1=$((pluggedtimer1 + 1))
echo "$pluggedtimer1" > ramdisk/pluggedtimer1
else
echo "0" > ramdisk/pluggedladungaktlp1
if (( stopchargeafterdisclp1 == 1 )); then
read boolstopchargeafterdisclp1 <ramdisk/boolstopchargeafterdisclp1
if (( boolstopchargeafterdisclp1 == 1 )); then
echo "0" > ramdisk/boolstopchargeafterdisclp1
mosquitto_pub -r -t "openWB/set/lp/1/ChargePointEnabled" -m "0"
fi
fi
fi
fi
if (( ladeleistung > 100 )); then
alog="$alog >100 "
if [ -e ramdisk/ladeustart ]; then
read ladelstart <ramdisk/ladelstart
bishergeladen=$(echo "scale=2;($llkwh - $ladelstart)/1" |bc | sed 's/^\./0./')
echo "$bishergeladen" > ramdisk/aktgeladen
gelrlp1=$(echo "scale=2;$bishergeladen / $durchslp1 * 100" |bc)
gelrlp1=${gelrlp1%.*}
echo "$gelrlp1" > ramdisk/gelrlp1
restzeitlp1=$(echo "scale=6;($lademkwh - $bishergeladen)/ $ladeleistung * 1000 * 60" |bc)
restzeitlp1=${restzeitlp1%.*}
echo "$restzeitlp1" > ramdisk/restzeitlp1m
if (( restzeitlp1 >= 60 )); then
restzeitlp1h=$((restzeitlp1 / 60))
restzeitlp1r=$((restzeitlp1 % 60))
echo "$restzeitlp1h H $restzeitlp1r Min" > ramdisk/restzeitlp1
else
echo "$restzeitlp1 Min" > ramdisk/restzeitlp1
fi
else
echo "1" > ramdisk/ladungaktivlp1
touch ramdisk/ladeustart
echo -e "$(date +%d.%m.%y-%H:%M)" > ramdisk/ladeustart
echo -e "$(date +%s)" > ramdisk/ladeustarts
echo "$lmodus" > ramdisk/loglademodus
echo "$llkwh" > ramdisk/ladelstart
if ((pushbenachrichtigung == "1")) ; then
if ((pushbstartl == "1")) ; then
./runs/pushover.sh "$lp1name Ladung gestartet$soctext"
fi
fi
openwbDebugLog "CHARGESTAT" 0 "LP1, Ladung gestartet."
fi
echo "0" > ramdisk/llog1
else
alog="$alog <100 "
read llog1 <ramdisk/llog1
if (( llog1 < 5 )); then
llog1=$((llog1 + 1))
echo "$llog1" > ramdisk/llog1
else
if [ -e ramdisk/ladeustart ]; then
echo "0" > ramdisk/ladungaktivlp1
echo "--" > ramdisk/restzeitlp1
read ladelstart <ramdisk/ladelstart
read ladeustarts <ramdisk/ladeustarts
bishergeladen=$(echo "scale=2;($llkwh - $ladelstart)/1" |bc | sed 's/^\./0./')
read start <ramdisk/ladeustart
jetzt="$(date +%d.%m.%y-%H:%M)"
jetzts="$(date +%s)"
ladedauer=$(((jetzts - ladeustarts) / 60 ))
ladedauers=$((jetzts - ladeustarts))
ladegeschw=$(echo "scale=2;$bishergeladen * 60 * 60 / $ladedauers" |bc)
gelrlp1=$(echo "scale=2;$bishergeladen / $durchslp1 * 100" |bc)
gelrlp1=${gelrlp1%.*}
if (( ladedauer >= 60 )); then
ladedauerh=$((ladedauer / 60))
laderest=$((ladedauer % 60))
sed -i '1i'$start,$jetzt,$gelrlp1,$bishergeladen,$ladegeschw,$ladedauerh' H '$laderest' Min,1',$loglademodus,$rfidlp1,$soc1KM $monthlyfile
if ((pushbenachrichtigung == "1")) ; then
if ((pushbstopl == "1")) ; then
./runs/pushover.sh "$lp1name Ladung gestoppt. $bishergeladen kWh in $ladedauerh H $laderest Min mit durchschnittlich $ladegeschw kW geladen$soctext"
fi
fi
else
sed -i '1i'$start,$jetzt,$gelrlp1,$bishergeladen,$ladegeschw,$ladedauer' Min,1',$loglademodus,$rfidlp1,$soc1KM $monthlyfile
if ((pushbenachrichtigung == "1")) ; then
if ((pushbstopl == "1")) ; then
./runs/pushover.sh "$lp1name Ladung gestoppt. $bishergeladen kWh in $ladedauer Min mit durchschnittlich $ladegeschw kW geladen$soctext"
fi
fi
fi
openwbDebugLog "CHARGESTAT" 0 "LP1, Ladung gestoppt"
rm ramdisk/ladeustart
fi
fi
fi
###################
#### LP2 ########
###################
if (( lastmanagement == 1 )); then
read ladeleistungs1 <ramdisk/llaktuells1
read llkwhs1 <ramdisk/llkwhs1
read plugstatlp2 <ramdisk/plugstats1
if (( plugstatlp2 == 1 )); then
read pluggedladungaktlp2 <ramdisk/pluggedladungaktlp2
if (( pluggedladungaktlp2 == 0 )); then
echo "$llkwhs1" > ramdisk/pluggedladunglp2startkwh
echo "1" > ramdisk/pluggedladungaktlp2
fi
read pluggedladunglp2startkwh <ramdisk/pluggedladunglp2startkwh
pluggedladungbishergeladenlp2=$(echo "scale=2;($llkwhs1 - $pluggedladunglp2startkwh)/1" |bc | sed 's/^\./0./')
echo "$pluggedladungbishergeladenlp2" > ramdisk/pluggedladungbishergeladenlp2
echo "0" > ramdisk/pluggedtimer2
if (( stopchargeafterdisclp2 == 1 )); then
read boolstopchargeafterdisclp2 <ramdisk/boolstopchargeafterdisclp2
if (( boolstopchargeafterdisclp2 == 0 )); then
echo "1" > ramdisk/boolstopchargeafterdisclp2
fi
fi
else
read pluggedtimer2 <ramdisk/pluggedtimer2
if (( pluggedtimer2 < 3 )); then
pluggedtimer2=$((pluggedtimer2 + 1))
echo "$pluggedtimer2" > ramdisk/pluggedtimer2
else
echo "0" > ramdisk/pluggedladungaktlp2
if (( stopchargeafterdisclp2 == 1 )); then
read boolstopchargeafterdisclp2 <ramdisk/boolstopchargeafterdisclp2
if (( boolstopchargeafterdisclp2 == 1 )); then
echo "0" > ramdisk/boolstopchargeafterdisclp2
mosquitto_pub -r -t "openWB/set/lp/2/ChargePointEnabled" -m "0"
fi
fi
fi
fi
if (( ladeleistungs1 > 100 )); then
if [ -e ramdisk/ladeustarts1 ]; then
read ladelstarts1 <ramdisk/ladelstarts1
bishergeladens1=$(echo "scale=2;($llkwhs1 - $ladelstarts1)/1" |bc | sed 's/^\./0./')
echo "$bishergeladens1" > ramdisk/aktgeladens1
gelrlp2=$(echo "scale=2;$bishergeladens1 / $durchslp2 * 100" |bc)
gelrlp2=${gelrlp2%.*}
echo "$gelrlp2" > ramdisk/gelrlp2
restzeitlp2=$(echo "scale=6;($lademkwhs1 - $bishergeladens1)/ $ladeleistungs1 * 1000 * 60" |bc)
restzeitlp2=${restzeitlp2%.*}
echo "$restzeitlp2" > ramdisk/restzeitlp2m
if (( restzeitlp2 >= 60 )); then
restzeitlp2h=$((restzeitlp2 / 60))
restzeitlp2r=$((restzeitlp2 % 60))
echo "$restzeitlp2h H $restzeitlp2r Min" > ramdisk/restzeitlp2
else
echo "$restzeitlp2 Min" > ramdisk/restzeitlp2
fi
else
if ((pushbenachrichtigung == "1")) ; then
if ((pushbstartl == "1")) ; then
./runs/pushover.sh "$lp2name Ladung gestartet$soctext1"
fi
fi
openwbDebugLog "CHARGESTAT" 0 "LP2, Ladung gestartet"
echo 1 > ramdisk/ladungaktivlp2
touch ramdisk/ladeustarts1
echo "$lmodus" > ramdisk/loglademodus
echo -e "$(date +%d.%m.%y-%H:%M)" > ramdisk/ladeustarts1
echo -e "$(date +%s)" > ramdisk/ladeustartss1
echo "$llkwhs1" > ramdisk/ladelstarts1
fi
echo "0" > ramdisk/llogs1
else
read llogs1 <ramdisk/llogs1
if (( llogs1 < 5 )); then
llogs1=$((llogs1 + 1))
echo "$llogs1" > ramdisk/llogs1
else
if [ -e ramdisk/ladeustarts1 ]; then
echo "0" > ramdisk/ladungaktivlp2
echo "--" > ramdisk/restzeitlp2
read ladelstarts1 <ramdisk/ladelstarts1
read ladeustartss1 <ramdisk/ladeustartss1
bishergeladens1=$(echo "scale=2;($llkwhs1 - $ladelstarts1)/1" |bc | sed 's/^\./0./')
read starts1 <ramdisk/ladeustarts1
jetzts1="$(date +%d.%m.%y-%H:%M)"
jetztss1="$(date +%s)"
ladedauers1=$(((jetztss1 - ladeustartss1) / 60 ))
ladedauerss1=$((jetztss1 - ladeustartss1))
ladegeschws1=$(echo "scale=2;$bishergeladens1 * 60 * 60 / $ladedauerss1" |bc)
gelrlp2=$(echo "scale=2;$bishergeladens1 / $durchslp2 * 100" |bc)
gelrlp2=${gelrlp2%.*}
if (( ladedauers1 >= 60 )); then
ladedauerhs1=$((ladedauers1 / 60))
laderests1=$((ladedauers1 % 60))
sed -i '1i'$starts1,$jetzts1,$gelrlp2,$bishergeladens1,$ladegeschws1,$ladedauerhs1' H '$laderests1' Min,2',$loglademodus,$rfidlp2,$soc2KM $monthlyfile
if ((pushbenachrichtigung == "1")) ; then
if ((pushbstopl == "1")) ; then
./runs/pushover.sh "$lp2name Ladung gestoppt. $bishergeladens1 kWh in $ladedauerhs1 H $laderests1 Min mit durchschnittlich $ladegeschws1 kW geladen$soctext1"
fi
fi
else
sed -i '1i'$starts1,$jetzts1,$gelrlp2,$bishergeladens1,$ladegeschws1,$ladedauers1' Min,2',$loglademodus,$rfidlp2,$soc2KM $monthlyfile
if ((pushbenachrichtigung == "1")) ; then
if ((pushbstopl == "1")) ; then
./runs/pushover.sh "$lp2name Ladung gestoppt. $bishergeladens1 kWh in $ladedauers1 Min mit durchschnittlich $ladegeschws1 kW geladen$soctext1"
fi
fi
fi
openwbDebugLog "CHARGESTAT" 0 "LP2, Ladung gestoppt"
rm ramdisk/ladeustarts1
fi
fi
fi
fi
###################
#### LP3 ########
###################
if (( lastmanagements2 == 1 )); then
read ladeleistungs2 <ramdisk/llaktuells2
read llkwhs2 <ramdisk/llkwhs2
read plugstatlp3 <ramdisk/plugstatlp3
if (( plugstatlp3 == 1 )); then
read pluggedladungaktlp3 <ramdisk/pluggedladungaktlp3
if (( pluggedladungaktlp3 == 0 )); then
echo "$llkwhs2" > ramdisk/pluggedladunglp3startkwh
echo "1" > ramdisk/pluggedladungaktlp3
fi
read pluggedladunglp3startkwh <ramdisk/pluggedladunglp3startkwh
pluggedladungbishergeladenlp3=$(echo "scale=2;($llkwhs2 - $pluggedladunglp3startkwh)/1" |bc | sed 's/^\./0./')
echo "$pluggedladungbishergeladenlp3" > ramdisk/pluggedladungbishergeladenlp3
echo "0" > ramdisk/pluggedtimer3
if (( stopchargeafterdisclp3 == 1 )); then
read boolstopchargeafterdisclp3 <ramdisk/boolstopchargeafterdisclp3
if (( boolstopchargeafterdisclp3 == 0 )); then
echo "1" > ramdisk/boolstopchargeafterdisclp3
fi
fi
else
read pluggedtimer3 <ramdisk/pluggedtimer3
if (( pluggedtimer3 < 3 )); then
pluggedtimer3=$((pluggedtimer3 + 1))
echo "$pluggedtimer3" > ramdisk/pluggedtimer3
else
echo "0" > ramdisk/pluggedladungaktlp3
if (( stopchargeafterdisclp3 == 1 )); then
read boolstopchargeafterdisclp3 <ramdisk/boolstopchargeafterdisclp3
if (( boolstopchargeafterdisclp3 == 1 )); then
echo "0" > ramdisk/boolstopchargeafterdisclp3
mosquitto_pub -r -t "openWB/set/lp/3/ChargePointEnabled" -m "0"
fi
fi
fi
fi
if (( ladeleistungs2 > 100 )); then
if [ -e ramdisk/ladeustarts2 ]; then
read ladelstarts2 <ramdisk/ladelstarts2
bishergeladens2=$(echo "scale=2;($llkwhs2 - $ladelstarts2)/1" |bc | sed 's/^\./0./')
echo "$bishergeladens2" > ramdisk/aktgeladens2
gelrlp3=$(echo "scale=2;$bishergeladens2 / $durchslp3 * 100" |bc)
gelrlp3=${gelrlp3%.*}
echo "$gelrlp3" > ramdisk/gelrlp3
restzeitlp3=$(echo "scale=6;($lademkwhs2 - $bishergeladens2)/ $ladeleistungs2 * 1000 * 60" |bc)
restzeitlp3=${restzeitlp3%.*}
echo "$restzeitlp3" > ramdisk/restzeitlp3m
if (( restzeitlp3 >= 60 )); then
restzeitlp3h=$((restzeitlp3 / 60))
restzeitlp3r=$((restzeitlp3 % 60))
echo "$restzeitlp3h H $restzeitlp3r Min" > ramdisk/restzeitlp3
else
echo "$restzeitlp3 Min" > ramdisk/restzeitlp3
fi
else
if ((pushbenachrichtigung == "1")) ; then
if ((pushbstartl == "1")) ; then
./runs/pushover.sh "$lp3name Ladung gestartet"
fi
fi
openwbDebugLog "CHARGESTAT" 0 "LP3, Ladung gestartet"
echo "1" > ramdisk/ladungaktivlp3
touch ramdisk/ladeustarts2
echo "$lmodus" > ramdisk/loglademodus
echo -e "$(date +%d.%m.%y-%H:%M)" > ramdisk/ladeustarts2
echo -e "$(date +%s)" > ramdisk/ladeustartss2
echo "$llkwhs2"> ramdisk/ladelstarts2
fi
echo "0" > ramdisk/llogs2
else
read llogs2 <ramdisk/llogs2
if (( llogs2 < 5 )); then
llogs2=$((llogs2 + 1))
echo "$llogs2" > ramdisk/llogs2
else
if [ -e ramdisk/ladeustarts2 ]; then
echo "0" > ramdisk/ladungaktivlp3
echo "--" > ramdisk/restzeitlp3
read ladelstarts2 <ramdisk/ladelstarts2
read ladeustartss2 <ramdisk/ladeustartss2
bishergeladens2=$(echo "scale=2;($llkwhs2 - $ladelstarts2)/1" |bc | sed 's/^\./0./')
read starts2 <ramdisk/ladeustarts2
jetzts2="$(date +%d.%m.%y-%H:%M)"
jetztss2="$(date +%s)"
ladedauers2=$(((jetztss2 - ladeustartss2) / 60 ))
ladedauerss2=$((jetztss2 - ladeustartss2))
ladegeschws2=$(echo "scale=2;$bishergeladens2 * 60 * 60 / $ladedauerss2" |bc)
gelrlp3=$(echo "scale=2;$bishergeladens2 / $durchslp3 * 100" |bc)
gelrlp3=${gelrlp3%.*}
if (( ladedauers2 >= 60 )); then
ladedauerhs2=$((ladedauers2 / 60))
laderests2=$((ladedauers2 % 60))
sed -i '1i'$starts2,$jetzts2,$gelrlp3,$bishergeladens2,$ladegeschws2,$ladedauerhs2' H '$laderests2' Min,3',$lademodus,$rfidlp3,$soc3KM $monthlyfile
if ((pushbenachrichtigung == "1")) ; then
if ((pushbstopl == "1")) ; then
./runs/pushover.sh "$lp3name Ladung gestoppt. $bishergeladens2 kWh in $ladedauerhs2 H $laderests2 Min mit durchschnittlich $ladegeschws2 kW geladen."
fi
fi
else
sed -i '1i'$starts2,$jetzts2,$gelrlp3,$bishergeladens2,$ladegeschws2,$ladedauers2' Min,3',$lademodus,$rfidlp3,$soc3KM $monthlyfile
if ((pushbenachrichtigung == "1")) ; then
if ((pushbstopl == "1")) ; then
./runs/pushover.sh "$lp3name Ladung gestoppt. $bishergeladens2 kWh in $ladedauers2 Min mit durchschnittlich $ladegeschws2 kW geladen."
fi
fi
fi
openwbDebugLog "CHARGESTAT" 0 "LP3, Ladung gestoppt"
rm ramdisk/ladeustarts2
fi
fi
fi
fi
# LP4-LP8
alog="ladelog $alog"
ptend "$alog" 10