Eric Saxe wrote: > Alexander Kolbasov wrote: > > Bill Holler <Bill.Holler at sun.com> wrote: > > > > > > Bill> It will be useful to have c-state information observable > > (including latency > > Bill> and power savings) during development and testing. Should c-state > > Bill> information be in a kstat such as the cpu_info kstat? > > > > Isn't c-state information extremely transient? I am wondering what value > > can you get if it is placed in kstats. IMO something like total time in > > various states might be more useful (if it is possible to obtain). > > > PowerTop conveys the total time in various c-states (over a given > sampling interval). I'm not sure how useful the "total time since the > system booted" would be, since that would probably include periods of > time where the system was busy.
You can easily use it to monitor current time in c-states by substracting accumulated time between snapshot - similar to the way various utilities deal with micro-state times which are also accumulated totals. And keeping accumulated totals allows us to easily get totals over last period T. - akolb
