previously i was writting a code to ping a websever to check if the server was down. and now from the program i will need to check if the power supply to a server is down, if it was, the UPS will be activated to supply power.
anyone know that how i could detect the power while UPS is up using C language. what function that i should include?