The servicelog package has been updated to version 1.0. This new version uses an sqlite database as a backend (instead of the Berkeley DB backend that the 0.x stream used). The primary advantage to the sqlite relational database backend is that queries of the servicelog can be performed with standard SQL queries. The –query flag to the servicelog command now takes an SQL WHERE clause as an argument. For example, to view all open serviceable events, run:
/usr/bin/servicelog --query "serviceable=1 and closed=0"
To view all migrations that a logical partition has undergone:
/usr/bin/servicelog --query 'refcode="#MIGRATE"'
The ability to register notification tools with servicelog, available in the 0.x stream, is still supported, with even more flexibility: now you can specify a query string for matching when registering a new notification tool. When a new event is logged, the tool will only be invoked if the event matches the criteria specified in that query string. For example, run the following command (as root) to cause a tool called /opt/foo/some_command to be automatically invoked just after a partition is migrated to a different system:
/usr/bin/servicelog_notify --add --command='/opt/foo/some_command' --match='refcode="#MIGRATE"'