title: How to detect a power failure?
body: <p>I want to be able to perform an action on power failure i.e when electricity goes off since my network routers are on UPS so it doesn't know about power failures so somehow I want to be able to store the power failure data into a text file through php so anyway possible to write power-failure data to a text file through PHP??</p>
  
  <p>Here is a screenshot of Mikrotik with different windows open regarding the question :
  <a href="https://i.stack.imgur.com/PfT8V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PfT8V.png" alt="enter image description here"></a></p>