Skip to content

Instantly share code, notes, and snippets.

@mbohun
Last active March 1, 2022 07:44
Show Gist options
  • Save mbohun/72bf48b4b8f11df01b2deab5da492adc to your computer and use it in GitHub Desktop.
Save mbohun/72bf48b4b8f11df01b2deab5da492adc to your computer and use it in GitHub Desktop.
pine_phone_battery_stats-1646099614..csv
time postmarketOS/phosh mobian/tapeworm
2022-03-01 12:53:36 93 92
2022-03-01 13:01:59 93 92
2022-03-01 13:10:01 92 92
2022-03-01 13:18:03 92 90
2022-03-01 13:26:06 91 88
2022-03-01 13:34:08 90 85
2022-03-01 13:42:10 89 82
2022-03-01 13:50:12 87 81
2022-03-01 13:58:14 86 79
2022-03-01 14:06:17 85 77
2022-03-01 14:14:19 83 75
2022-03-01 14:22:21 82 72
2022-03-01 14:30:23 81 69
2022-03-01 14:38:25 80 67
2022-03-01 14:46:27 79 65
2022-03-01 14:54:29 77 62
2022-03-01 15:02:31 76 60
2022-03-01 15:10:33 75 58
2022-03-01 15:18:35 74 56
2022-03-01 15:26:37 72 54
2022-03-01 15:34:39 71 53
2022-03-01 15:42:41 69 52
2022-03-01 15:50:43 66 50
2022-03-01 15:58:45 64 49
2022-03-01 16:06:48 63 47
2022-03-01 16:14:50 61 46
2022-03-01 16:22:52 60 44
2022-03-01 16:30:54 58 43
2022-03-01 16:38:57 57 41
2022-03-01 16:46:59 55 39
2022-03-01 16:55:01 54 38
2022-03-01 17:03:03 52 37
2022-03-01 17:11:05 51 34
2022-03-01 17:19:08 51 33
2022-03-01 17:27:10 50 30
2022-03-01 17:35:12 49 27
2022-03-01 17:43:14 48 23
2022-03-01 17:51:17 47 19
2022-03-01 17:59:19 46 17
2022-03-01 18:07:21 45 16
2022-03-01 18:15:23 44 15
2022-03-01 18:23:25 44 14
2022-03-01 18:31:27 43 7
2022-03-01 18:39:50 42 DEAD
#!/bin/bash
stats=pine_phone_battery_stats-`date +%s`.csv
while true
do
pos=`ssh -x [email protected] cat /sys/class/power_supply/axp20x-battery/capacity`
mob=`ssh -x [email protected] cat /sys/class/power_supply/axp20x-battery/capacity`
echo "`date +"%Y-%m-%d %X"`, ${pos}, ${mob}" >> $stats
sleep 480
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment