Ubuntu MegaCLI control for PERC H700

Sources:
https://www.nico-maas.de/?p=1702
https://www.broadcom.com/support/knowledgebase/1211161500661/installing-megacli-in-debian-or-ubuntu
http://erikimh.com/megacli-cheatsheet/
https://www.thomas-krenn.com/de/wiki/MegaRAID_Controller_mit_MegaCLI_verwalten

LSI Page: https://www.broadcom.com/products/storage/raid-controllers/megaraid-sas-9271-4i#downloads
MegaCLI 5.5 P2 64 bit - Use this link to download the file to the server.

apt install alien
alien  -k --scripts MegaCli-8.07.14-1.noarch.rpm
dpkg -i megacli_8.07.14-1_all.deb
cp /opt/MegaRAID/MegaCli/MegaCli64 /usr/local/sbin/megacli

Now we can run commands like:

megacli -AdpBbuCmd -aALL | grep "Battery State:"