Skip to content

This script ensures your Oracle Cloud Always Free instance maintains a minimum CPU and RAM usage to avoid deactivation due to inactivity.

License

Notifications You must be signed in to change notification settings

Monster-ZeroX/Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer

This script ensures your Oracle Cloud Always Free instance maintains a minimum CPU and RAM usage to avoid deactivation due to inactivity.

🔗 Table of Contents


📍 Overview

❯ 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.


👾 Features

  • Keeps CPU usage between 10-15%.
  • Maintains RAM usage around 10%.
  • Automatic setup and service management using systemd.

📁 Project Structure

└── Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer/
    ├── LICENSE
    ├── README.md
    ├── cpu_maintainer.conf
    ├── cpu_maintainer.py
    └── install.sh

🚀 Getting Started

☑️ Prerequisites

Before getting started with Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer, ensure your runtime environment meets the following requirements:

  • Programming Language: Python, Shell

⚙️ Installation

Install Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer using one of the following methods:

🖥Automatic Installation

  1. 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
  1. Navigate to the project directory:
cd Oracle-Cloud-Always-Free-CPU-and-RAM-Maintainer
  1. Run the installer:
sudo ./install.sh
  1. Monitor the service:
sudo systemctl status cpu_maintainer
  1. Check the logs for usage information:
tail -f /var/log/cpu_maintainer.log

🧩Manual Installation

  1. Install the Python dependency psutil:
pip3 install psutil
  1. 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
  1. Run the script manually:
sudo python3 /root/cpu_maintainer.py
Stop the script by terminating the process manually:
  1. Stop the script by terminating the process manually:
ps aux | grep cpu_maintainer.py
kill <PID>

🔧 How It Works

  • 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.

🔰 Contributing

  • 💬 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.

🎗 License

This project is protected under the GPL-3.0 license License. For more details, refer to the LICENSE file.


About

This script ensures your Oracle Cloud Always Free instance maintains a minimum CPU and RAM usage to avoid deactivation due to inactivity.

Topics

Resources

License

Stars

Watchers

Forks