This script ensures your Oracle Cloud Always Free instance maintains a minimum CPU and RAM usage to avoid deactivation due to inactivity.
❯ The Oracle Cloud Always Free CPU and RAM Maintainer is a lightweight utility designed to help users maintain their Always Free Oracle Cloud VPS by ensuring consistent resource usage. Oracle requires a minimum level of CPU and RAM utilization to keep the free tier instances active, and this project automates the process.
- Keeps CPU usage between 10-15%.
- Maintains RAM usage around 10%.
- Automatic setup and service management using
systemd
.
└── Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer/
├── LICENSE
├── README.md
├── cpu_maintainer.conf
├── cpu_maintainer.py
└── install.sh
Before getting started with Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer, ensure your runtime environment meets the following requirements:
- Programming Language: Python, Shell
Install Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer using one of the following methods:
- Clone the Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer repository:
git clone /~https://github.com/Monster-ZeroX/Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer
- Navigate to the project directory:
cd Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer
- Run the installer:
sudo ./install.sh
- Monitor the service:
sudo systemctl status cpu_maintainer
- Check the logs for usage information:
tail -f /var/log/cpu_maintainer.log
- Install the Python dependency psutil:
pip3 install psutil
- Copy the script and configuration file to the /root directory:
sudo cp cpu_maintainer.py /root/cpu_maintainer.py
sudo cp cpu_maintainer.conf /root/cpu_maintainer.conf
sudo chmod +x /root/cpu_maintainer.py
- Run the script manually:
sudo python3 /root/cpu_maintainer.py
Stop the script by terminating the process manually:
- Stop the script by terminating the process manually:
ps aux | grep cpu_maintainer.py
kill <PID>
- CPU Usage Monitoring: The script dynamically spawns threads to simulate CPU activity when usage falls below the specified threshold and removes them when it exceeds the upper limit.
- RAM Usage Simulation: Allocates memory blocks to maintain a consistent RAM usage target.
- Configuration File: Users can customize thresholds and check intervals via a .conf file.
- Systemd Integration: Ensures the script runs automatically on boot and restarts if it fails.
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests for the
Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer
project. - 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
This project is protected under the GPL-3.0 license License. For more details, refer to the LICENSE file.