Brian Utterback wrote: > In an effort to make ntpd a little more Solaris friendly and integrated, > I am looking at doing some work with it regarding privs and smf. > I've already got the smf_maintain_instance thing going, (thanks David, > Darren, Ranaud and Tony for your help!) and I was looking at how ntpd > should react if it cannot find a server to synchronize with. > > You see, there are a couple of cases here. First when ntpd starts, > it might take a while synchronize the clock. I presume that if the > start method hasn't exited, then the service is flagged as still in > startup. But, what should ntpd do if it loses contact with the > servers for an extended length of time? > > My thought was to have a threshold such that if the clock has not > been synchronized for longer than the threshold, the ntpd service > would be marked as in a degraded mode. Is that the right thing to > do? Again, I presume that to go into degraded mode you use > smf_degrade_instance and smf_restore_instance to come out. Is that > right? Are there any consequences to going into degraded mode? Is > there anything that informs the admin that a service has become > degraded? Should there be a limit to how often a service goes into > and out of degraded mode? Brian,
smf_degrade and smf_restore would be ideal for your described scenario. The bad news is that degrade is not yet implemented :^( smf_maintenance may not be an option as it would stop all the running processes. Don't have a workaround, I'm afraid. How about outputting a message into syslog to notify that something went wrong? -tony