Nicolas Williams writes: > We have a service that needs to reliably detect at start time whether it > has started before since the last boot. And we need to reliably store > some state in case of crashes. > > The question is: can the service use SMF properties to track the > relevant state? > > We'd use one property to track the date/time of the first service start > since boot (unless SMF provides a way to get that already) and another > to track a very small amount of state that would be updated from time to > time. > > Nico > -- > _______________________________________________ > smf-discuss mailing list > smf-discuss at opensolaris.org
Nico, I don't see any reason why you couldn't do what you are proposing. If you store the date/time of the first service start as a volatile property, it automatically get removed on reboot. This would make it easy to tell if the service is starting for the first time. Without knowing more about your state information, I don't know whether or not volatile properties are appropriate for it. tom