The development of distributed automation systems built on the use of wireless communication channels has led to an increase in the role of autonomous power systems. These systems use so-called CCS - chemical current sources, both rechargeable (accumulators) and non-rechargeable (batteries, or galvanic batteries). Depending on the purpose and operating conditions, the battery life of the same type may be different, and for some automation systems, knowing its current value is critical. An example of such a system is an automated telemetry system for drilling oil and gas wells, in which its constituent modules are powered from an autonomous source based on lithium-thionyl chloride cells. A feature of the system is the presence of several modes of operation, which differ significantly from each other in duration and energy consumption. The article proposes an algorithm for monitoring the residual resource of galvanic batteries, which provides a correct account of the consumed resource for modes of any duration. A feature of the algorithm is the accounting of the consumed resource through the formation and calculation of conditional single portions, the so-called basic electric charge. For this, a double integration of the voltage proportional to the consumed current is used. Checking the proposed algorithm for monitoring the residual life of the CCS in the program for modeling electrical circuits Electronics Workbench confirmed its feasibility.