Snippet to create a graph of Veritas Cluster Server resource dependancies

A quick one-liner to generate a graph of clusters (graph clusters that is), one for each service group on a cluster containing a dependency map of all the resources. echo 'digraph ResourceDependancy {'; for P in `sudo /opt/VRTS/bin/hagrp -list | awk '{print $1}' |sort -u`; do echo "subgraph cluster${P}{"; echo "label=$P;"; for R in `sudo /opt/VRTS/bin/hagrp -resources $P`; do sudo /opt/VRTS/bin/hares -dep $R | egrep -v '#Group' | awk '{print $2"->"$3";"}'; done | sort -u; echo '}'; done; echo '}' Very, very quick work here. Your milage may very.

Recent comments