Debugging Akonadi Resources
It is possible to debug a specific akonadi resource. This is done by restarting akonadi with specific environment variables. For example to debug the EWS resource:
- Heaptrack (memory profiler) with
AKONADI_HEAPTRACK=akonadi_ews_resource akonadictl restartto start the profiling andakonadictl stopto stop it. - Valgrid (dynamic memory analysis tool) with the
AKONADI_VALGRINDenvironment variable. By default, this uses thememchecktool, but this can be changed with theAKONADI_VALGRIND_SKINenvironment variable. More options can be passed with theAKONADI_VALGRIND_OPTIONSenvironment variable. - Perf (CPU profiler) with the
AKONADI_PERFenvironment variable. This can then be visualized with Hotspot.
This variables are defined in akonadicontrol
Debugging the EWS resource
By using the following logging rules, Akonadi will dump the content of the EWS responses to a temporary directory.
QT_LOGGING_RULES="*org.kde.pim.ews*=true" akonadictl restart