Some sample code and tips can be found here about Power Management on Linux/Fedora:
- varcpuload.c Simple C program to create reproducable artifical sustained load on a machine.
- varnetload Simple Python script to create reproducable sustained network traffic.
- genresult.sh Simple bash script that runs powertop in dump mode and creates a brief summary of the run.
- malloc_trim_ldp.c A LDPRELOAD library that can be used to potentially save memory for larger apps.