Stephen Hahn wrote: > * Michael Barrett <Michael.Barrett at sun.com> [2007-04-11 11:58]: >> Does SMF have any concept of how many times it has restarted a service? >> Both automatically and via svcadm? In other words, can you ask it >> that or look somewhere and see a count incremented? Note looking at the >> /var/svc/log/<name>:default.log and counting the start procedures is not >> what I'm looking for. > > Not completely, and definitely not via a public API. > Requirements/ideas would be welcome. Richard Elling's had some ideas > on this topic; there's an RFE in the bug database somewhere. And I > keep wanting to do service availability accounting, but that may be > more heavyweight than you're looking for...
Yes, the thought was how to answer the question, "what is the uptime of service xyz?" If we could count how many seconds we spent in each state for each service then we could answer that question. The next question is "how many times did my service change state?" which is just another counter. It seems to me that adding a bunch of kstats to svc.startd and a 1 second timer should do it. I thought I filed an RFE on this long ago... -- richard