In Linux is there an API, interface or library to access the electrical power hardware for state, health and historical data? [closed]
We don’t allow questions seeking recommendations for books开发者_StackOverflow, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionIn Linux, is there an API, interface, or library to access the electrical power hardware (for mains and battery) for state, health and historical data?
Particularly, I'm looking to find out if such subsystems record historical data.
I'm aware that power technology and battery technology could be quite sophisticated - for example, the "intelligent" battery technology that the Apple notebooks are said to have.
But my example is more about general server equipment power and battery supplies and what historical data you can get from them, e.g. how often the mains power cable has been removed and battery taken over, etc.
I need to know this as part of testing such equipment.
I'd think such a thing would be pretty hardware-specific. One general approach is to use SNMP. The manufacturer of the server may have already written various MIBs to allow monitoring of various things and, with some work, one can write their own to take more specialized actions and measurements. If you have newish HP servers, they have a built-in SNMP-like package called iLO, or integrated-lights-out.
Server equipment doesn't generally have batteries. UPSes on the other hand do. I use a program called 'nut' to monitor my UPS, and it uses a bunch of plugins to support multiple different UPS brands. There is no single API that supports all of them.
精彩评论