[Orca-users] Question concerning scaling of avenrun

Blair Zajac blair at orcaware.com
Tue May 25 21:35:45 PDT 2004


Roland Crüsemann wrote:

> Hello,
> 
> why are the parameters
> avenrun_1min
> avenrun_5min
> avenrun_15min
> divided by 256 in orcallator.se?
> 
> Best regards,
> Roland Cruesemann

Roland,

The values as retrieved from the SE toolkit are unsigned integers so 
they need to be scaled to double values.

kstat struct "system_misc" ks_system_misc {
     uint32_t ncpus;
     uint32_t lbolt;
     uint32_t deficit;
     uint32_t clk_intr;
     uint32_t vac;
     uint32_t nproc;
     uint32_t avenrun_1min;
     uint32_t avenrun_5min;
     uint32_t avenrun_15min;
#if MINOR_VERSION >= 60
     uint32_t boot_time;
#endif
};

If you look at SE's app_wrap_class.se, then you'll see it's divided by 
256 there too:

     avenrun_1min  = system_misc_values.avenrun_1min  / 256.0;
     avenrun_5min  = system_misc_values.avenrun_5min  / 256.0;
     avenrun_15min = system_misc_values.avenrun_15min / 256.0;


I can't find any documentation on this via Google and I don't have a 
Solaris box to check out, but this does generate the correct values.

Best,
Blair




More information about the Orca-users mailing list