From 412ea7a936ebaa5342a4c2abf48b9e408e6ba5dc Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 6 Nov 2015 11:06:52 +0100 Subject: core: support IEC suffixes for RLIMIT stuff Let's make things more user-friendly and support for example LimitAS=16G rather than force users to always use LimitAS=16106127360. The change is relevant for options: [Default]Limit{FSIZE,DATA,STACK,CORE,RSS,AS,MEMLOCK,MSGQUEUE} The patch introduces config_parse_bytes_limit(), it's the same as config_parse_limit() but uses parse_size() tu support the suffixes. Addresses: https://github.com/systemd/systemd/issues/1772 --- man/systemd-system.conf.xml | 6 ++++-- man/systemd.exec.xml | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'man') diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml index 8dad0e0f59..54ce992b85 100644 --- a/man/systemd-system.conf.xml +++ b/man/systemd-system.conf.xml @@ -342,8 +342,10 @@ resource limits for units. See setrlimit2 for details. Use the string infinity to - configure no limit on a specific resource. These settings may - be overridden in individual units using the corresponding + configure no limit on a specific resource. The multiplicative suffixes + K (=1024), M (=1024*1024) and so on for G, T, P and E may be used for + resource limits measured in bytes (e.g. DefaultLimitAS=16G). These + settings may be overridden in individual units using the corresponding LimitXXX= directives. Note that these resource limits are only defaults for units, they are not applied to PID 1 itself. diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index c0ecf92419..7462960000 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -568,7 +568,9 @@ of various resources for executed processes. See setrlimit2 for details. Use the string infinity to - configure no limit on a specific resource. + configure no limit on a specific resource. The multiplicative suffixes + K (=1024), M (=1024*1024) and so on for G, T, P and E may be used for + resource limits measured in bytes (e.g. LimitAS=16G). Limit directives and their equivalent with ulimit -- cgit v1.2.3-54-g00ecf