mirror of
https://github.com/systemd/systemd
synced 2026-03-22 23:04:52 +01:00
Compare commits
No commits in common. "bedc15706e213a806b18824d1bcb66d381fa2a06" and "176b8be10ffce2f8c1fc931a37904a528057016f" have entirely different histories.
bedc15706e
...
176b8be10f
@ -21,17 +21,7 @@ fi
|
||||
|
||||
rm -rf /etc/systemd/system/testsuite-55-testbloat.service.d
|
||||
|
||||
echo "DefaultMemoryPressureDurationSec=2s" >>/etc/systemd/oomd.conf
|
||||
|
||||
mkdir -p /etc/systemd/system/systemd-oomd.service.d/
|
||||
echo -e "[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug" >/etc/systemd/system/systemd-oomd.service.d/debug.conf
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
# if oomd is already running for some reasons, then restart it to make sure the above settings to be applied
|
||||
if systemctl is-active systemd-oomd.service; then
|
||||
systemctl restart systemd-oomd.service
|
||||
fi
|
||||
echo "DefaultMemoryPressureDurationSec=5s" >>/etc/systemd/oomd.conf
|
||||
|
||||
systemctl start testsuite-55-testchill.service
|
||||
systemctl start testsuite-55-testbloat.service
|
||||
@ -39,18 +29,16 @@ systemctl start testsuite-55-testbloat.service
|
||||
# Verify systemd-oomd is monitoring the expected units
|
||||
oomctl | grep "/testsuite-55-workload.slice"
|
||||
oomctl | grep "1.00%"
|
||||
oomctl | grep "Default Memory Pressure Duration: 2s"
|
||||
oomctl | grep "Default Memory Pressure Duration: 5s"
|
||||
|
||||
systemctl status testsuite-55-testchill.service
|
||||
|
||||
# systemd-oomd watches for elevated pressure for 2 seconds before acting.
|
||||
# systemd-oomd watches for elevated pressure for 5 seconds before acting.
|
||||
# It can take time to build up pressure so either wait 2 minutes or for the service to fail.
|
||||
timeout="$(date -ud "2 minutes" +%s)"
|
||||
while [[ $(date -u +%s) -le $timeout ]]; do
|
||||
if ! systemctl status testsuite-55-testbloat.service; then
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
sleep 5
|
||||
done
|
||||
|
||||
# testbloat should be killed and testchill should be fine
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user