新手提问:QNX4.25计算CPU负荷

中文QNX 讨论: 欢迎大家灌水,讨论有关QNX 问题。

新手提问:QNX4.25计算CPU负荷

帖子catseye96 » 周一 11月 17, 2008 11:24 am

Q4计算CPU负荷提供了函数qnx_osstat,可以得到32个优先级的平均负荷cpu_load[i]。但是这个平均负荷到底是多长时间内的呢?

手册里也写了:
The period over which the cpu_load is averaged is set by the sac utility. The numbers are relative to each other

看了SAC的使用,感觉-i参数比较靠谱:
The Kernel collects statistics on processor activity at each priority level. These statistics are integrated over time. The -i option sets the integration factor for the system. Smaller values average over shorter periods, resulting in a faster response to changes in system activity. Larger values let you monitor average activity over a longer period of time. If you set the integration factor to 0, then statistics won't be gathered. If you don't specify the -i option, then the current integration factor will be used. If a node is not gathering statistics, you will be told to set a value for the integration factor. In this case, re-run sac with a nonzero value for the -i option.

最终的问题:SAC的-i参数设置了一个因子(我理解的),那么这个因子乘以的是什么时间间隔呢?即cpu_load是多长时间间隔内的平均负荷?
catseye96
New Member
 
帖子: 2
注册: 周一 11月 17, 2008 11:13 am

回到 四海同心QNX论坛

在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客

cron