If, like me you have gathered quite a list of clusters in your Veritas Cluster Monitor java proggie on Windows, you will likely be frustrated with the manual way you have to order them.

Here is a method to re-order them alphabetically, providing you have a UNIX server you can run a quick script on.

Stop your Vertitas Cluster Monitor program and copy the .vxcsClusterPrefs file in your Windows home directory to a convenient UNIX server and run the following script there:

cat $infile | grep vacs.cluster | awk -F= '{print $2}' | sort > $tmpfile
cat $infile | sed '/vxcs.cluster/d' > $tmpfile2
cat $tmpfile | while read line
   echo "vxcs.cluster.${count}=$line"
done >> $tmpfile2
mv $tmpfile2 $infile
rm $tmpfile

Now move the .vxcsClusterPrefs file back to your Windows home directory overwriting the original.

When you restart your Veritas Cluster Monitor the clusters should be sorted a little more nicely.

I’m sure some sed/awk god could distill this into a much smaller bit of code, but this works for me 🙂

About troyski

I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation