Compare commits
2 Commits
6e62842112
...
f91e7f9706
Author | SHA1 | Date |
---|---|---|
slee649 | f91e7f9706 | |
Sea-Eun Lee | 84b25bf0b4 |
|
@ -74,6 +74,10 @@ int manager_parse_config_file(Manager *m) {
|
||||||
unsigned long l, f;
|
unsigned long l, f;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
arg_swap_used_limit_permyriad = -1;
|
||||||
|
arg_mem_pressure_limit_permyriad = -1;
|
||||||
|
arg_mem_pressure_usec = DEFAULT_MEM_PRESSURE_DURATION_USEC;
|
||||||
|
|
||||||
static const ConfigTableItem items[] = {
|
static const ConfigTableItem items[] = {
|
||||||
{ "OOM", "SwapUsedLimit", config_parse_permyriad, 0, &arg_swap_used_limit_permyriad },
|
{ "OOM", "SwapUsedLimit", config_parse_permyriad, 0, &arg_swap_used_limit_permyriad },
|
||||||
{ "OOM", "DefaultMemoryPressureLimit", config_parse_permyriad, 0, &arg_mem_pressure_limit_permyriad },
|
{ "OOM", "DefaultMemoryPressureLimit", config_parse_permyriad, 0, &arg_mem_pressure_limit_permyriad },
|
||||||
|
|
|
@ -288,12 +288,11 @@ testcase_reload() {
|
||||||
mkdir -p /run/systemd/oomd.conf.d/
|
mkdir -p /run/systemd/oomd.conf.d/
|
||||||
{
|
{
|
||||||
echo "[OOM]"
|
echo "[OOM]"
|
||||||
echo "SwapUsedLimit=90%"
|
|
||||||
echo "DefaultMemoryPressureLimit=60%"
|
|
||||||
echo "DefaultMemoryPressureDurationSec=2s"
|
echo "DefaultMemoryPressureDurationSec=2s"
|
||||||
} >/run/systemd/oomd.conf.d/99-oomd-test.conf
|
} >/run/systemd/oomd.conf.d/99-oomd-test.conf
|
||||||
|
|
||||||
systemctl reload systemd-oomd.service
|
systemctl reload systemd-oomd.service
|
||||||
|
|
||||||
assert_in 'Swap Used Limit: 90.00%' "$(oomctl)"
|
assert_in 'Swap Used Limit: 90.00%' "$(oomctl)"
|
||||||
assert_in 'Default Memory Pressure Limit: 60.00%' "$(oomctl)"
|
assert_in 'Default Memory Pressure Limit: 60.00%' "$(oomctl)"
|
||||||
assert_in 'Default Memory Pressure Duration: 2s' "$(oomctl)"
|
assert_in 'Default Memory Pressure Duration: 2s' "$(oomctl)"
|
||||||
|
|
Loading…
Reference in New Issue