forked from GrapheneOS/infrastructure
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
count
executable file
·69 lines (52 loc) · 2.88 KB
/
count
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
#!/bin/bash
set -o errexit -o nounset -o pipefail
[[ $# -ge 1 ]] || exit 1
. hosts.sh
DEVICES=(comet komodo caiman tokay akita husky shiba felix tangorpro lynx cheetah panther bluejay raven oriole barbet redfin bramble sunfish coral flame)
release=$1
rm -rf logs
mkdir logs
for host in ${hosts_releases[@]}; do
echo obtaining logs from $host
ssh $host journalctl -u nginx -o cat -g ' 200 ' >> logs/merged.log
done
grep Dalvik/ logs/merged.log > logs/merged-device.log
echo
echo update checks
echo total $(grep -Pc -- "/\w+-(stable|beta|alpha)" logs/merged-device.log)
echo gen 9 $(grep -Pc -- "/(comet|komodo|caiman|tokay)-(stable|beta|alpha)" logs/merged-device.log)
echo gen 8 $(grep -Pc -- "/(akita|husky|shiba)-(stable|beta|alpha)" logs/merged-device.log)
echo gen 7 $(grep -Pc -- "/(felix|tangorpro|lynx|cheetah|panther)-(stable|beta|alpha)" logs/merged-device.log)
echo gen 6 $(grep -Pc -- "/(bluejay|raven|oriole)-(stable|beta|alpha)" logs/merged-device.log)
echo gen 5 $(grep -Pc -- "/(barbet|redfin|bramble)-(stable|beta|alpha)" logs/merged-device.log)
echo gen 4 $(grep -Pc -- "/(sunfish|coral|flame)-(stable|beta|alpha)" logs/merged-device.log)
echo
for device in ${DEVICES[@]}; do
echo $device $(grep -Pc "/$device-(stable|beta|alpha)" logs/merged-device.log)
done
echo
echo factory images
echo total $(grep -Pc "/\w+-factory-\d+.zip" logs/merged.log)
echo gen 9 $(grep -Pc "/(comet|komodo|caiman|tokay)-factory-\d+.zip" logs/merged.log)
echo gen 8 $(grep -Pc "/(akita|husky|shiba)-factory-\d+.zip" logs/merged.log)
echo gen 7 $(grep -Pc "/(felix|tangorpro|lynx|cheetah|panther)-factory-\d+.zip" logs/merged.log)
echo gen 6 $(grep -Pc "/(bluejay|raven|oriole)-factory-\d+.zip" logs/merged.log)
echo gen 5 $(grep -Pc "/(barbet|redfin|bramble)-factory-\d+.zip" logs/merged.log)
echo gen 4 $(grep -Pc "/(sunfish|coral|flame)-factory-\d+.zip" logs/merged.log)
echo
for device in ${DEVICES[@]}; do
echo $device $(grep -Pc "/$device-factory-\d+.zip" logs/merged.log)
done
echo
echo updates to $release
echo total $(grep -Pc "/\w+-(ota_update|incremental-\d+)-$release.zip" logs/merged-device.log)
echo gen 9 $(grep -Pc "/(comet|komodo|caiman|tokay)-factory-\d+.zip" logs/merged.log)
echo gen 8 $(grep -Pc "/(akita|husky|shiba)-(ota_update|incremental-\d+)-$release.zip" logs/merged-device.log)
echo gen 7 $(grep -Pc "/(felix|tangorpro|lynx|cheetah|panther)-(ota_update|incremental-\d+)-$release.zip" logs/merged-device.log)
echo gen 6 $(grep -Pc "/(bluejay|raven|oriole)-(ota_update|incremental-\d+)-$release.zip" logs/merged-device.log)
echo gen 5 $(grep -Pc "/(barbet|redfin|bramble)-(ota_update|incremental-\d+)-$release.zip" logs/merged-device.log)
echo gen 4 $(grep -Pc "/(sunfish|coral|flame)-(ota_update|incremental-\d+)-$release.zip" logs/merged-device.log)
echo
for device in ${DEVICES[@]}; do
echo $device $(grep -Pc "/$device-(ota_update|incremental-\d+)-$release.zip" logs/merged-device.log)
done