Tuesday Sep 15, 2009

Debugging fmd plugins

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

Then you need to run fmd with the right options. Running it in the forground also helps with starting restarting it

# /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.

About

Chris W Beal

Search

Archives
« July 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   
       
Today