Unsolved
This post is more than 5 years old
49 Posts
0
1930
October 13th, 2008 09:00
SRDF monitor script
Looking for a script to monitor the status of a few SRDF groups using SE. Am I pretty much limited to running a job in cron every "X" amount of minutes, or is there a better way to do this. I'm a scripting moron, so if no one has anything already that they can copy/paste for me, would you guys suggest doing a "symrdf -g $GROUP query | egrep "$DEVS" | awk '{print $12}' | sort -u", and if any state besides "Consistent" is returned, to just send an email via mailx? Thanks in advance for any input or advice.
No Events found!
xe2sdc
2 Intern
•
2.8K Posts
0
October 13th, 2008 11:00
symrdf -g $GROUP -consistent verify
I'd redirect output to a logfile (or /dev/null) and check for return code ($?).
A return code of "0" (true, in shell) means all devices in DG are consistent
dynamox
9 Legend
•
20.4K Posts
0
October 13th, 2008 15:00
dynamox
9 Legend
•
20.4K Posts
0
October 13th, 2008 15:00
tonydcdi-ymiT1
70 Posts
0
October 13th, 2008 15:00
tonydcdi-ymiT1
70 Posts
0
October 13th, 2008 15:00
Message was edited by:
tonydcdi
xe2sdc
2 Intern
•
2.8K Posts
0
October 13th, 2008 22:00
xe2sdc
2 Intern
•
2.8K Posts
0
October 13th, 2008 22:00
tazal
59 Posts
0
October 14th, 2008 07:00
SRDF groups using SE. Am I pretty much limited to
running a job in cron every "X" amount of minutes, or
is there a better way to do this. I'm a scripting
moron, so if no one has anything already that they
can copy/paste for me, would you guys suggest doing a
"symrdf -g $GROUP query | egrep "$DEVS" | awk '{print
$12}' | sort -u", and if any state besides
"Consistent" is returned, to just send an email via
mailx? Thanks in advance for any input or advice.
Read the symrecover documentation and/or man page, it may provide what you want right out of the box.