I've never actually seen battery backed write cache in harddisks - only in RAID controllers. How to query the controller is rather specific to your hardware. It will almost certainly require root privileges on the box.
For example, using Dell PERC controllers, and having dell-omsa-repository installed, I can do:
# omreport storage battery
List of Batteries in the System
Controller SAS 6/iR Integrated (Slot Embedded)
No Batteries found
On another server:
# omreport storage battery
List of Batteries in the System
Controller PERC 4e/Di (Slot Embedded)
ID : 0
Status : Ok
Name : Battery 0
State : Ready
Recharge Count : 0
Max Recharge Count : 1100
Predicted Capacity Status : Not Applicable
Learn State : Not Applicable
Next Learn Time : Not Applicable
Maximum Learn Delay : Not Applicable
I haven't been able to find right now how to ask it what the current write cache setting is, but I think I've seen it in there before. However, if you're not using Dell RAID controllers, you will need different software.