scfdot: SMF Dependency Graph Generator
This is a thumbnail of a graph of
the SMF services and their dependencies on
an x86 system freshly installed with Solaris Nevada build 24:

The actual graph is a 10 foot by 3.5 foot PostScript file.
It was generated by the scfdot program
and the dot command from the graphviz package.
The C source code for scfdot and its supporting files
are available in this tarball.
Feel free to send comments, ideas for improvement, or patches to
smf dash discuss at opensolaris dot org .
Here is the README from that package:
scfdot - Generate a graphviz file of SMF services and dependencies
Solaris 10 features the Service Management Facility (SMF), which starts
services in dependency order. Run "man smf" for more information. scfdot
reads the service names and dependencies from the Service Configuration
Facility (SCF) repository and writes a file which the dot program from the
graphviz package can render into a graph. You can obtain graphviz from
http://graphviz.org .
Once graphviz is installed and dot and cc are on your path, you should be able
to generate a PostScript file of the dependency graph on your system by
running
$ make
This will compile scfdot.c, execute it, and execute dot to produce
$HOSTNAME.ps. If dot is not on your path, then modify Makefile to indicate
how to invoke dot. If cc is not available, add a line to Makefile which sets
CC to how to invoke your compiler.
To view the graph with gv, I recommend
- The -noantialias option. Otherwise the black labels on the colored
backgrounds look bad.
- Adding a 1/100 zoom option to gv and using that for the initial view.
Otherwise gv will ask your X server for a ton of memory, which can cause
it to thrash. Add the option by putting
GV.scales: Natural size, 1.000, screen \n\
Pixel based, 1.000, pixel \n\
0.010, 0.010 \n\
0.100, 0.100 \n\
0.125, 0.125 \n\
0.250, 0.250 \n\
0.500, 0.500 \n\
0.707, 0.707 \n\
1.000, 1.000 \n\
1.414, 1.414 \n\
2.000, 2.000 \n\
4.000, 4.000 \n\
8.000, 8.000 \n\
10.00, 10.00
in ~/.gv . Make it the initial view by including "-scale -6" in the
command line.
The Makefile also has options for changing the command line arguments to
scfdot. See the comment at the top of scfdot.c for available options.
The files in this package are
README - This file.
AUTHORS - Author credits.
CDDL.LICENSE - License.
Makefile - Makefile for building scfdot, running it, running the
scripts, and running dot to produce a PostScript file of
the dependency graph.
scfdot.c - C program which generates dot files.
enlarge.awk - awk script which enlarges PostScript files. Used to
make a legend for the graph.
setpage.awk - awk script which adds commands to a PostScript file
which direct an HP DesignJet 800ps plotter to print the
file in one continuous page.
snv_24_x86.dot - Sample output file.
snv_24_x86.ps - Sample graph.
|