Debugging fmd plugins
By Chris W Beal on Sep 15, 2009
This is really just a note to myself as I keep forgetting the options. I'm developing some new plugins for fmd. When they don't work, there's loads of additional data you can get out which isn't there by default, and you can add debug print statements to your code like
fmd_hdl_debug(hdl, "Crash dump instance %ld\\n", cdp->scd_panic_instance);
But these won't be visible unless you fmd in a debug mode.
First you need to disable fmd
# svcadm disable fmd
# /usr/lib/fm/fmd/fmd -o fg=true -o client.debug=true
If you want to see what fmd it's self is doing add the -o debug=all flag
# /usr/lib/fm/fmd/fmd -o fg=true -o client.debug=true -o debug=all
Then you see those lovely debug messages.