On Sun, May 15, 2011 at 03:01:53AM -0400, Seva Gluschenko wrote:
>Aleksey,
>
>don't mess CPU utilization with load average, these two are pretty
>different. While I doubt seriously that LA could rise to 100 while CPU
>usage is 6% only, they aren't directly connected.

Oh, I've seen boxes with a load of 50 or 100, and CPU usage is 0%.  :)
It happens to NFS clients when they lose connection to an NFS server,
and lots of cron jobs pile up, trying to access something over the NFS
mount, and they all go into a 'D' (uninterruptable sleep) state.

Generally, cycle scavenging programs like SETI@Home, or anything that
runs under the BOINC framework, already have pretty good
self-throttling features that are more flexible than what you could do
with just cfengine.

I'd suggest just making a CF3 promise to make sure that your daemons are
running and have the proper configurations.  Then let the built-in
routines (in your programs) do their job.

>2011/5/15 Aleksey Tsalolikhin <atsaloli.t...@gmail.com>:
>> Hi.  I am trying to think of an example of a policy that reacts to
>> environmental data collected by cf-monitord...
>>
>> I thought I might do something with "diskfree" but there is already
>> "freespace" under "volume" that will warn if free space is too low.
>>
>> Then I thought, how about I check CPU utilization, and if it is under
>> a certain threshold, we can start a program to donate CPU cycles to
>> SETI@home (or similar), and if CPU goes over another, top, threshold,
>> then we stop SETI@home program.   But $(mon.value_cpu) returns zero no
>> matter what my actual CPU utilization is.  I've opened bug
>> https://cfengine.com/bugtracker/view.php?id=612
>>
>>
>> I tried $(mon.value_loadavg) which is supposed to return kernel % CPU
>> utilization but it returns 100 when, according to vmstat, the system
>> CPU utilization percentage is closer to 6.
>>
>>
>> I still need an example of how Cfengine could react to environmental data.
>>
>>
>> Any suggestions, please?
>>
>> Aleksey
>> _______________________________________________
>> Help-cfengine mailing list
>> Help-cfengine@cfengine.org
>> https://cfengine.org/mailman/listinfo/help-cfengine
>>
>
>
>
>-- 
>SY, Seva Gluschenko.
>_______________________________________________
>Help-cfengine mailing list
>Help-cfengine@cfengine.org
>https://cfengine.org/mailman/listinfo/help-cfengine

-- 
Jesse Becker
NHGRI Linux support (Digicon Contractor)
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to