# ec2-hibernate-linux-agent **Repository Path**: mirrors_aws/ec2-hibernate-linux-agent ## Basic Information - **Project Name**: ec2-hibernate-linux-agent - **Description**: A Hibernating Agent for Linux on Amazon EC2 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-04-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # The EC2 Spot hibernation agent (Legacy) > With the release of a new generation of Spot Hibernation, this repo has entered legacy status > > Please refer to the [hibinit-agent](https://github.com/aws/amazon-ec2-hibinit-agent) repo now used for Spot Hibernation > > Related Documentation: > * Instructions to enable Spot Hibernation | [Link](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernate-spot-instances.html) ## License The code is released under Apache License Vesion 2.0. See LICENSE.txt for details. ## Description This agent does several things: 1. Upon startup it checks for sufficient swap space to allow hibernate and fails if it's present but there's not enough of it. 2. If there's no swap space, it creates it and launches a background thread to touch all of its blocks to make sure that EBS volumes are pre-warmed. 3. It updates the offset of the swap file in the kernel using SNAPSHOT_SET_SWAP_AREA ioctl. 4. It daemonizes and starts a polling thread to listen for instance termination notifications. ## Building The code can be build using the usual Python setuptools: ``` python setup.py install ``` Additionally, you can build an sRPM package for CentOS/RedHat by running "make sources".