How to debug fmd plugins
Reference: https://blogs.oracle.com/cwb/entry/debugging_fmd_plugins
We have in code:
fmd_hdl_debug(hdl, "Crash dump instance %ld\\n", cdp->scd_panic_instance);
But these won't be visible unless you fmd in debug mode.
Steps below provide example how to enable debug output.
Disable fmd service:
svcadm disable fmd
Run fmd in foreground with debug prints:
/usr/lib/fm/fmd/fmd -o fg=true -o client.debug=true
Run in foreground with all debug info:
/usr/lib/fm/fmd/fmd -o fg=true -o client.debug=true -o debug=all