I would like to save certain information from acpitool and also the load of all my CPUs as a function of time.
More specifically acpitool -B
gives me the following output:
Battery #1 : present
Remaining capacity : 72250 mWh, 77.27%, 03:47:52
Design capacity : 93600 mWh
Last full capacity : 93500 mWh, 99.89% of design capacity
Capacity loss : 0.1068%
Present rate : 19024 mW
Charging state : Discharging
Battery type : Li-ion
Model number : 45N1011
Serial number : 36403
I would like to have an ascii file where I save the remaining capacity (all three quantities, i.e. the remaining capacity, percentage and time), the present rate and the load of my eight CPUs and the average load as a function of time, e.g.
t remaining_capacity remaining_percentage remaining_time CPU_1 CPU_2 ...
Can I do that just with bash and if yes how? If not what is a good way to do that?