Comments (7)
This is just an example. we use this to klll user processes that consume to much resources on our login nodes. This code must be run on compute nodes.
bundle agent sara_user_consume_resources(minutes, memory, exclude)
{
processes:
any::
".*"
comment => "Kill processes that use to much resources",
signals => { "term", "kill"},
action => sara_action,
process_select => sara_user_consume_resources_select("$(minutes)", "$(memory)", @(exclude));
}
##
# Kill processes that uses too much cpu time or memory and exclude
# important users
#
body process_select sara_user_consume_resources_select(minutes, memory, owners)
{
command => "ssh.*|scp.*|rsync.*|cp.*|mv.*|tar.*|gzip.*|bzip2.*";
process_owner => { @(owners) };
##
# Bug in ps parsing minutes are seconds. so use the hour field for minutes
# ttime_range => irange(accumulated(0,0,0,"$(minutes)",0,0), accumulated(1,0,0,0,0,0));
ttime_range => irange(accumulated(0,0,0,0,"$(minutes)",0), accumulated(1,0,0,0,0,0));
#
rsize => irange("$(memory)", 'inf');
process_result => "(ttime|rsize).!(process_owner|command)";
}
from evolve_cfengine_freelib.
@basvandervlies Is there a bug report for that time parsing problem?
from evolve_cfengine_freelib.
@neilhwatson this is fixed a long time ago. I must remove this statement. There is a bug report and pull request:
from evolve_cfengine_freelib.
@basvandervlies I think this bug is still true or the verbose output is off:
snmp 2728 1 0 Aug22 ? 00:02:19 /usr/sbin/snmpd
verbose: P: Container path : '/default/main/processes/'/usr/sbin/snmpd.:'[0]' verbose: P: verbose: P: Comment: Set kill class if count too high verbose: P: ......................................................... verbose: verbose: Selection filter matched counter range 'TIME/TIME' = '00:02:19' in [60,999999999] (= 139 secs)
from evolve_cfengine_freelib.
Ok, i have the source for 3.6 and check it against the 3.7 version
On 24 aug. 2015, at 19:44, Neil H Watson [email protected] wrote:
@basvandervlies I think this bug is still true or the verbose output is off:
snmp 2728 1 0 Aug22 ? 00:02:19 /usr/sbin/snmpdverbose: P: Container path : '/default/main/processes/'/usr/sbin/snmpd.:'[0]'
verbose: P:
verbose: P: Comment: Set kill class if count too high
verbose: P: .........................................................
verbose:
verbose: Selection filter matched counter range 'TIME/TIME' = '00:02:19' in [60,999999999](= 139 secs)—
Reply to this email directly or view it on GitHub.
Bas van der Vlies
| Operations, Support & Development | SURFsara | Science Park 140 | 1098 XG Amsterdam
| T +31 (0) 20 800 1300 | [email protected] | www.surfsara.nl |
from evolve_cfengine_freelib.
https://dev.cfengine.com/issues/7516
from evolve_cfengine_freelib.
new bug https://tracker.mender.io/browse/CFE-2115?jql="External%20issue%20id"~"7516"
from evolve_cfengine_freelib.
Related Issues (20)
- Replace readstringarrayidx with data_readstringarrayidx HOT 3
- A single JSON using bundle might replace efl_global_strings and efl_global_slists HOT 1
- De-referencing a list for iteration does not work HOT 1
- Support mustache templates
- formalize efl_update.cf
- Convert delta hardening data to json HOT 1
- make efl_service support cfengine and mustache templates
- yaml support HOT 1
- Bundles system auditing
- Imrprove performance on efl_class_hostname2
- Add efl_class_hostrange
- Fix hostnameX bundle tests for generic hostname
- Fix hostrange bundle test for generic hostname
- Fix efl_package* tests replacing e3 package.
- obsolete promise type meta in efl_server_csv, efl_server_json HOT 3
- Add docker management bundle HOT 2
- Bundle to manage docker images HOT 1
- the freelib produces the following errors HOT 7
- promise summary not logging cfengine-3.10-1 and RHEL7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evolve_cfengine_freelib.