Akonadi Console is a tool for developers working with Akonadi or on Akonadi itself.
It provides GUI for
It enables the developer to quickly add or remove agents from the currently running Akonadi system, to check an agent's basic properties and status, etc.
While most of these actions can also be performed through end user GUI, e.g. KDE's Systemsettings, this is usually quicker and it provides more detailed information.
|The Synchronize action menu can be used to just synchronize the collection tree, basically a convenient way for a resource developer to call just the retrieveCollections() method.|
This facility shows all Akonadi collections, how they are organized as a tree and their items and enables the developer to perform actions on these entities.
Developers working on agents can use this perform the most common tasks such as
without having to go through an end user application.
Developers working on end user applications can use this to simulate respective changes by other clients and to check whether changes done by the application itself are correctly applied to the shared data.
|If a newly added resource's collections do not show up in the collection tree, it might be necessary to explicitly synchronize it. This functionality is available on the Agents tab.|
This facility allows to monitor the Akonadi data protocol based communication between client sessions and the server. It contains commands, responses and the data transported between the two sides.
|Since this can slow down operations it is disabled by default and has to be enabled manually when needed.|
Akonadi uses a SQL database for keeping relations such as which collection an item is in, properties such as MIME types, etc. as well as cached item payload data.
Since this is quite internal to the Akonadi server, it will most likely only be interesting to people working on Akonadi, not for developers working with Akonadi.
The database browser can query and display the database tables used by Akonadi.
The database console enables developers to directly send commands to the database engine.
Agents are automatically started by the Akonadi server and thus are not debugable from the start on by the usual methods. A similar problem is known from KIO slaves, the solution is similar as well.
Export the environment variable AKONADI_DEBUG_WAIT and put the agent type in there you want to debug. You only need to specify a part of the agent type, not the whole one. Example:
When starting an agent of this type, you'll see the following debug output by the Akonadi server which is pretty much self-explanatory.
============================================================ ProcessControl: Suspending process akonadi_knut_resouce 'gdb -pid 1234' to debug 'kill -SIGCONT 1234' to continue ============================================================
Running an agent in valgrind is done in a similar way, you need to export AKONADI_VALGRIND and put the agent type in there.
To specify the valgrind tool to use by exporting AKONADI_VALGRIND_SKIN, the default is memcheck.
Additional config options can be given using AKONADI_VALGRIND_OPTIONS.
valgrind akonadi_cpntacs_resource using memcheck:
To get the name of a resource, open akonadiconsole, select your resource and use the identifier being displayed at the bottom, but stip the _0 or similar from the end.
Profile the persons resource using callgrind, disabling instrumentation on start for faster startup, and dumping the callgrind output to a custom file:
export AKONADI_VALGRIND=akonadi_contacts_resource export AKONADI_VALGRIND_SKIN=callgrind export AKONADI_VALGRIND_OPTIONS="--instr-atstart=no --callgrind-out-file=$HOME/callgrind-vcard.%p"
The Akonadi Test project provides tools to run Akonadi tests in self-contained environments, i.e. separated from the developer's personal setup, as well as running automated tests, e.g. as part of a unit test suite.
When running Akonadi on embedded devices or on a non-UI system, it can be useful to connect to it with clients such as akonadiconsole from a remote system. However, the Akonadi server uses local sockets for communication and therefore does not allow this directly. Same for D-Bus, which is essential for Akonadi client-server communication as well as the various debugging features in akonadiconsole.
The solution for this is the Akonadi Remote Debugging Server (Akonadi RDS), a small tunnel server that runs next to the Akonadi server. Starting it is trivial:
Now you need to tell your client how to connect to the remote instance. This is done by setting the following environment variables:
$ export AKONADI_SERVER_ADDRESS=tcp:<server ip>,port=31415
$ export DBUS_SESSION_BUS_ADDRESS=tcp:<server ip>,port=31416
Afterwards, just start your client as usual. Obviously, this is not limited to Akonadi but will just as well work for pure D-Bus connections with any D-Bus client, which can be quite useful by itself already.
There are currently a few limitations when using akonadi_rds: