I have some Linux code that monitors our hardware by collecting temperatures, voltages, and fan speeds, from the motherboard using inb(), outb(), inl(), etc. low level i/o f
Most hardware locations are mapped in areas not accesible from userspace, so you are going to need a device driver that provides the desired API.
You can also check the UNIX Application Migration Guide ad MSDN.