It may have escaped your attention, but some time ago IBM released three PTFs for IBM i OS releases 5.4, 6.1, and 7.1, respectively, providing a convenient method of gathering battery cache information for service purposes. I’ve added links at the end of this article taking you to the APARs and PTF cover letters associated with the PTFs.
These PTFs add a program named QSMBTTCC to library QSYS. When the program is run, it displays a spooled file containing the battery cache information for the IBM i partition in which the function is run. Once displayed, you have the option of printing the spooled file for documentation purposes.
Download the save file containing the source code.