All have expected behavior of journalctl showing the SWAP size being reduced similar to
Sep 25 22:33:08 ip-172-31-18-186 hibinit-agent[935]: Found '/var/lib/hibinit-agent/hibernation-enabled', configuring hibernation
Sep 25 22:33:08 ip-172-31-18-186 hibinit-agent[935]: Will check if swap is at least: 4000 megabytes
Sep 25 22:33:08 ip-172-31-18-186 hibinit-agent[935]: Swap already exists! (have 16571219968, need 4194304000), deleting existing swap file /swap-hibinit since current swap is sufficiently large and wasting memory
Testing this is a little involved, so I made this test script - https:/ /github. com/mitchdz/ ec2-hibinit- agent-lp2031345
I tested Lunar/Jammy/Focal
All have expected behavior of journalctl showing the SWAP size being reduced similar to
Sep 25 22:33:08 ip-172-31-18-186 hibinit-agent[935]: Found '/var/lib/ hibinit- agent/hibernati on-enabled' , configuring hibernation
Sep 25 22:33:08 ip-172-31-18-186 hibinit-agent[935]: Will check if swap is at least: 4000 megabytes
Sep 25 22:33:08 ip-172-31-18-186 hibinit-agent[935]: Swap already exists! (have 16571219968, need 4194304000), deleting existing swap file /swap-hibinit since current swap is sufficiently large and wasting memory