09-25-2014 05:32 AM
Solved! Go to Solution.
09-26-2014 12:54 AM
To find out why it fails you need to see the error text from the bpstart_notify
This is a example of how you can modify the script to log error messages to a text file:
#!/bin/ksh
set -x
# Close STDOUT file descriptor
exec 1<&-
# Close STDERR FD
exec 2<&-
# Open STDOUT as $LOG_FILE file for read and write.
exec 1<> /tmp/nma.txt
# Redirect STDERR to STDOUT
exec 2>&1
echo "This line will appear in $LOG_FILE, not 'on screen'"
# Should end up in timer_log.log
echo "This is a message"
echxo "This is an error message!"
09-25-2014 05:56 AM
Why would you stop the Network Time Protocol daemons ?
NTP ensure the computer clock is correct and do not drift
09-25-2014 08:04 AM
I can't think why you'd want to do that either. But to test the script, first make sure the command is valid by running it by hand.
/etc/init.d/ntpd stop
Then verify the script is in the correct folder and run it manually
/usr/openv/netbackup/bin/bpstart_notify
09-25-2014 08:19 AM
If the command runs correctly manually then you need to find out why it cannot run when the backup does .. that could be a rights issue so check the permissions for root on the files (ntpd and the bpstart_notify)
09-25-2014 08:20 AM
Sorry. NTP is an examle.
I would like to stop some serives.
09-25-2014 11:06 AM
Same thing, permissions to do so. run it manually first, if it works but doesn't with the script, then it permissions or something else. What version of NetBackup and are you running it from an appliance?
09-26-2014 12:54 AM
To find out why it fails you need to see the error text from the bpstart_notify
This is a example of how you can modify the script to log error messages to a text file:
#!/bin/ksh
set -x
# Close STDOUT file descriptor
exec 1<&-
# Close STDERR FD
exec 2<&-
# Open STDOUT as $LOG_FILE file for read and write.
exec 1<> /tmp/nma.txt
# Redirect STDERR to STDOUT
exec 2>&1
echo "This line will appear in $LOG_FILE, not 'on screen'"
# Should end up in timer_log.log
echo "This is a message"
echxo "This is an error message!"