I have seen a few old attempts at scripting threads, but haven't seen any take off.
Anyone have any symcli scripts that they'd like to share? I'll start off with this one. "emc-maskrep". This script uses symacces commands to document the masking views for a VMax. Its written in perl, and uses the XML::Simple and Data::Dumper perl modules to parse the XML output of the symaccess commands.
Thanks for the feedback. I'll take a look at the changes to support windows that you made, that will help me make my scripts more multi-platform.
The XML stuff is kind of obscure and complicated. It was probably a harder script to understand than most perl. Were my comments helpful enough?
I mentioned this script in a different thread, but I'll post it here to keep this consolidated.
Any other scripts that people want to brag about?
emc-listlogins takes the output of "symaccess list logins" and makes it easier to read, and flags possible errors. it lists the intitiator group that is assoicated with a login, making note of logins that do not have an initiator group. it also makes note of initiator group entries that do not have an active login on the VMax. Like my other scripts, this one uses XML output, so it requires the perl modules to use it.
Hi, these few lines can help someone that need to check the SRDF replica state.
for sid in XXX
/usr/symcli/bin/symrdf -sid $sid list -rdfg all | grep -v '-' | grep -v "Consistent" | grep -v "Synchronized" |egrep "RW|WD" >/tmp/ciao.txt
# [ -s /tmp/ciao.txt ]&& cat /tmp/ciao.txt |\
if [ -s /tmp/ciao.txt ]; then cat /tmp/ciao.txt |\
mailx -s "symdev su VMAX XXX in different state that "Sync" or "Consistent"" email@example.com