When the question of what starts OSWatcher (OSW) on Exadata was raised at a client site I thought I’d take a quick look. It took me a little longer than I expected to work out the detail and therefore it seems worth sharing.
If you’re simply looking to change the “snapshot interval”, “archive retention” or “compression command” then /opt/oracle.cellos/validations/init.d/oswatcher is what you need to modify and you’ll find a line with ./startOSW.sh X Y Z. Where X is the snapshot interval, Y is the archive retention and Z is the compression command used to compress the output files.
If you’re curious to know the details of what starts and restarts OSWatcher than read on.
The following is applicable to the X2-2 I regularly get my hands on which is running 188.8.131.52.2 and I don’t know if things change with later versions, so apologies if this isn’t applicable to your Exadata environment.
Startup of OSWatcher on boot is indirectly handled by /etc/init.d/rc.local, which includes:
########### BEGIN DO NOT REMOVE Added by Oracle Exadata ########### if [ -x /etc/rc.d/rc.Oracle.Exadata ]; then . /etc/rc.d/rc.Oracle.Exadata fi ########### END DO NOT REMOVE Added by Oracle Exadata ###########
# Perform validations step /opt/oracle.cellos/vldrun -all
The main purpose of /opt/oracle.cellos/vldrun and the Perl script /opt/oracle.cellos/validations/bin/vldrun.pl appears to be ensuring configuration changes are made on initial boot and after upgrades, although I haven’t looked into all the detail yet. The part of /opt/oracle.cellos/vldrun that is relevant in the context of starting OSWatcher on every boot is:
$VLDRUN_PL -quiet "$@"
This executes /opt/oracle.cellos/validations/bin/vldrun.pl with the -quiet and -all arguments (as that was passed to /opt/oracle.cellos/vldrun)
The “quiet” argument is pretty obvious and a little reading reveals that “all” simply means that all scripts in /opt/oracle.cellos/validations/init.d/ should be executed.
So off to /opt/oracle.cellos/validations/init.d/ we go:
root@my-host ~]# ls -1 /opt/oracle.cellos/validations/init.d/ beginfirstboot biosbootorder cellpreconfig checkconfigs checkdeveachboot checklsi diskhealth ipmisettings misceachboot misczeroboot oswatcher postinstall sosreport syscheck [root@my-host ~]#
… and in oswatcher, as already mentioned in the second paragraph of the post, you’ll find ./startOSW.sh X Y Z, where X is the snapshot interval, Y is the archive retention and Z is the compression command used to compress the output files.
OK, so that’s what starts OSWatcher on boot, but you should also know that OSWatcher is restarted daily by /etc/cron.daily/cellos, which includes:
/opt/oracle.cellos/validations/bin/vldrun.pl -script oswatcher > /dev/null 2>&1
The only bit of all this that doesn’t really sit right with me is that OSWatcher is included with “validations”. That doesn’t seem like an appropriate description to me.
Trivial as it may be, I hope that later version of the Exadata software move from what is described above to the “service” based approach used on non-Exadata platforms and documented in How To Start OSWatcher Black Box Every System Boot [ID 580513.1]. This feel like a much more standard approach and allows control of the service using the /sbin/service and /sbin/chkconfig commands.