Operating System - HP-UX
1753715 Members
4914 Online
108799 Solutions
New Discussion юеВ

Check make_net_recovery files

 
SOLVED
Go to solution
Alex_17
Frequent Advisor

Check make_net_recovery files

Hi,

I'd like to check if a make_net_recovery files is correct using an script. I schedule a script which runs a make_net_recovery and I'd like to add a check to send an email if any problem. Can anyone tell me a way to check if make_net_recovery files is ok?.

Thanks,

Alex.
2 REPLIES 2
Praveen Bezawada
Respected Contributor
Solution

Re: Check make_net_recovery files

Hi
You can check the return value of make_tape_recovery as
make_tape_recovery
if [ $? -ne 0 ];then
/usr/sbin/sendmail xxx <your message
INPUT
For any other messages you can monitor the file /var/opt/ignite/logs/makrec.log1 where make_tape_recovery logs the errors.
Or you can also use -v option to run it in verbose mode and capture any error messages.
Hope this helps...

...BPK...
Magdi KAMAL
Respected Contributor

Re: Check make_net_recovery files

Hi Alex,

I would add another test for the last post like :

if [ $? -ne 0 -a $? -ne 2];then
/usr/sbin/sendmail operatorName <Your message to the operator...
EOM

This also allows to exclude the warrnings from being considered as errors ( spacially in MC service guard issue when each package is responssible of mounting specific file systems ).

Magdi