As far as I'm known, the extended information is only available when
you're invoking cf-agent using -I option. There's a reason to submit a
feature request about process_select body for allowance of greater
verbosity, because process number is indeed not very informative.

2010/11/16 Bas van der Vlies <b...@sara.nl>:
> On 16-11-10 11:54, Seva Gluschenko wrote:
>>
>> Bas :)
>>
>> just remove action modifier. Warning action means do nothing, just
>> warn. If you remove the modifier, both warning and signal will be
>> produced.
>>
>
> Seva,
>
>  In my first mail "action_policy" was unset and then the following output is
> produced with "report_level    => inform;" else nothing is displayed:
> {{{
>  -> Signalled 'term' (15) to observed process match '13839'
>  -> Signalled 'kill' (9) to observed process match '13839'
>  -> Signalled 'term' (15) to observed process match '13515'
>  -> Signalled 'kill' (9) to observed process match '13515'
> }}}
>
> I want the whole process line. That is only displayed when i set the
> action_policy to "warn".  Or did i miss an option?
>
>> 2010/11/16 Bas van der Vlies<b...@sara.nl>:
>>>
>>> On 15-11-10 15:31, Bas van der Vlies wrote:
>>>>
>>>> version: cfengine community 3.1.0
>>>>
>>>> when i process is killed in cfengine 3 we only see the pid:
>>>> {{{
>>>> cf3  !! Process count for '.*' was out of promised range (1 found)
>>>> cf3 I: Made in version '1.2.0' of
>>>> '/var/lib/cfengine3/inputs/lisa/quarterly.cf' near line 20
>>>> cf3 I: Comment: Kill processes that use to much resources
>>>>
>>>> cf3  ->    Signalled 'term' (15) to observed process match '30255'
>>>> cf3  ->    Signalled 'kill' (9) to observed process match '30255'
>>>> cf3  ->    No restart promised for .*
>>>> R: There are user procesees that consume too much
>>>> }}}
>>>>
>>>> in cfengine 2 we see the whole match:
>>>> {{{
>>>> cfengine:login3: Signalled process 19558 (.*) with SIGKILL
>>>> cfengine:login3: Killed: cedricm  19558 24.6 13.1 2181584 2167444 pts/28
>>>> R+
>>>>    15:20   0:05 cresuint
>>>> }}]
>>>>
>>>> So we can contact the user and know which program is executed. Is this
>>>> possible with cf3?
>>>
>>> when i defined an body action for the processes :
>>>
>>> processes:
>>>     LOGIN_HOST::
>>>        ".*"
>>>          comment         =>  "Kill processes that use to much resources",
>>>          signals         =>  { "term", "kill"},
>>>          process_count   =>  check_range("user_procs", "0", "0"),
>>>          action          =>  sara_action,
>>>          process_select  =>  sara_user_consume_resources("15",
>>> "1073741824", @(exclude_owners));
>>>
>>>
>>> body action sara_action
>>> {
>>>  action_policy   =>  "warn";
>>> }
>>>
>>> ====================================
>>>
>>> I get the desired output result, but the process is not killed:
>>> {{{
>>>  !! Matched: bas      11589 99.7  0.0    100    16 pts/3    R+   10:22
>>> 10:22 burnP6
>>> Process alert: USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START
>>> TIME COMMAND
>>> Process alert: bas      11589 99.7  0.0    100    16 pts/3    R+   10:22
>>> 10:22 burnP6
>>>  !! Process count for '.*' was out of promised range (1 found)
>>> I: Made in version '1.2.0' of
>>> '/var/lib/cfengine3/inputs/lisa/quarterly.cf'
>>> near line 21
>>> I: Comment: Kill processes that use to much resources
>>> }}}
>>>
>>> Maybe a new action_policy: fixandwarn.
>>>
>>>
>>> --
>>> ********************************************************************
>>> *  Bas van der Vlies                    e-mail: b...@sara.nl       *
>>> *  SARA - Academic Computing Services   Amsterdam, The Netherlands *
>>> ********************************************************************
>>> _______________________________________________
>>> Help-cfengine mailing list
>>> Help-cfengine@cfengine.org
>>> https://cfengine.org/mailman/listinfo/help-cfengine
>>>
>>
>>
>>
>
>
> --
> ********************************************************************
> *  Bas van der Vlies                    e-mail: b...@sara.nl       *
> *  SARA - Academic Computing Services   Amsterdam, The Netherlands *
> ********************************************************************
>



-- 
SY, Seva Gluschenko.
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to