If $G$ is an arbitrary abelian $p$-group, an invariant $K_G$ is defined which measures how closely $G$ resembles a direct sum of cyclic groups. This invariant consists of a class of finite sets of regular cardinals, and is inductively constructed using filtrations of various subgroups of $G$; $K_G$ can also be considered to be a measure of the presence of non-zero elements of infinite height in $G$. This construction is particularly useful when the group has final rank less than the smallest weakly Mahlo cardinal; and in this case, $G$ is a direct sum of cyclics iff $K_G$ is empty. These deliberations are then used to place several of the most significant results relating to direct sums of cyclics into a significantly broader context. For e...