Coder Social home page Coder Social logo

luiz-trindade / protect_memory_daemon Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 26 KB

RAM Memory Protector A program that monitors and dynamically adjusts memory usage, terminating processes exceeding predefined thresholds to prevent memory overflows. Ideal for ensuring system stability and efficiency.

License: GNU General Public License v3.0

Python 100.00%

protect_memory_daemon's Introduction

RAM Memory Protector

Created by: Luiz Gabriel Magalhães Trindade

License: GPL-3.0


Description

The RAM Memory Protector is a simple program designed to monitor RAM memory usage and protect the system from potential memory overflows. It continuously checks running processes and terminates those that exceed a predefined limit. Additionally, the program adapts its behavior based on the system's power profile, ensuring a more aggressive or conservative approach depending on whether the computer is using battery power or connected to the charger.


Features

  • Continuous Monitoring: The program performs regular checks of RAM memory usage to detect and respond to potential issues.

  • Dynamic Adjustment: The program's behavior is adjusted based on the system's power profile, providing an adaptive response.

  • Process Termination: Processes exceeding the defined percentage of memory usage are terminated to prevent overflows.


Requirements

  • Python 3.x
  • Psutil library (pip install psutil)
  • python-daemon library (pip install python-daemon)

How to Use

  1. Ensure you have Python 3.x installed on your system.
  2. Install the psutil library using the command pip install psutil.
  3. Run the program using the command python protect_memory_daemon.py.

Executable Creation

This program can be bundled into an executable using PyInstaller. Once created, configure the executable to start with the system according to the conventions of your operating system to enable the daemon functionality.

On Windows:

python -m PyInstaller --onefile protect_memory_daemon.py

On Unix like systems (Linux, BSD's or MacOS)

pyinstaller --onefile protect_memory_daemon.py

The executable will appear in the "dist/" folder.


Contributions

Contributions are welcome! Feel free to open issues or send pull requests to improve this project.


License

This program is distributed under the GPL-3.0 license. See the LICENSE file for more details.

protect_memory_daemon's People

Contributors

luiz-trindade avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.