> > >> echo "[`date +%s`] > >> CHANGE_NORMAL_SVC_CHECK_INTERVAL;tigris;DiskBackupMountCheck;3" > > Printf is POSIX standard, but both my command and the printf produce > the same output. Try both and see. If you don't understand why they > produce the same output, read the man pages and get a book on shell > programming.
the issue isn't with the use of printf or echo, but rather the strings which they are printing. also, i know what shell substitution is but am not familiar with the expression [%lu] and had no idea that was equivalent to the output of `date +%s`. what is confusing about your example is that you seem to omit the trailing `date +%s` at the end of your command, as opposed to the provided example: now=`date +%s` commandfile='/usr/local/nagios/var/rw/nagios.cmd' /bin/printf "[%lu] CHANGE_NORMAL_SVC_CHECK_INTERVAL;host1;service1;15\n" $now > $commandfile the $now preceeding the redirection to the command file being equivalent to the string returned by `date +%s` this cannonical example is a bit confusing then: why does it have the date at the beginning, i.e. the first [%lu], and then again at the end with $now ? you seem to omit the second date from your command although in your example you also don't echo a newline nor show the redirect which that part I at least assume. > > Right. The new schedule won't take effect until the currently > scheduled poll is run at the original scheduling interval AFAICT. If > you want the new interval to take affect immediately you need to force > it with a SCHEDULE_FORCED_SVC_CHECK command. > thank you for the clarification regarding this. but i am still not seeing the CHANGE_NORMAL_SVC_CHECK_INTERVAL register in objects.cache. i will continue delving into that and then eventually implement SCHEDULE_FORCED_SVC_CHECK as per your suggestion. thanks again for your illuminating help! ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null