> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs-staging.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Receive sensor temperature notifications

The thermal core framework uses the `Netlink` interface to provide sensor temperature notifications to the user space.

User space applications can use the thermal Netlink library to receive sensor temperature notifications and take the appropriate action.

## Receive notifications

1. Define callbacks for the thermal events that the application needs to handle, such as thermal zone, trip point, cooling device, and temperature events.
2. Initialize the thermal Netlink library with the callbacks.
3. Subscribe to the required thermal multicast event groups.
4. Run the event loop and process each notification in the appropriate callback.
5. Release the thermal Netlink library resources when the application exits.

For API definitions and a usage example, see:

* [Linux thermal library](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/thermal?h=v6.6)
* [Linux Thermal Engine example](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/thermal/thermal-engine/thermal-engine.c?h=v6.6)

## Next steps

* [Optimize performance with thermal tuning](optimize-performance-with-thermal-tuning)
