Skip to main content

System Requirements

Before installing Memory Monitor, ensure your system meets these requirements:
  • Operating System: Linux (any distribution)
  • Python Version: Python 3.x
  • Access: Read permissions for /proc filesystem
  • Dependencies: None (uses only Python standard library)
Memory Monitor is specifically designed for Linux systems as it reads from the /proc filesystem. It will not work on Windows or macOS.

Installation Steps

1

Verify Python Installation

First, check that you have Python 3.x installed on your system:
python3 --version
You should see output like Python 3.x.x. If Python is not installed, install it using your distribution’s package manager:
# Debian/Ubuntu
sudo apt update
sudo apt install python3

# Fedora/RHEL
sudo dnf install python3

# Arch Linux
sudo pacman -S python
2

Clone the Repository

Clone the Memory Monitor repository to your local machine:
git clone https://github.com/leonardo02lobo/Memory-Monitor.git
cd Memory-Monitor
Alternatively, if you received the source files directly, extract them to a directory:
mkdir memory-monitor
cd memory-monitor
# Copy main.py, memory_info.py, and process_analyzer.py here
3

Verify File Structure

Ensure all three required Python files are present in your directory:
ls -l
You should see:
  • main.py - The entry point that runs the monitoring tool
  • memory_info.py - Contains the InformationMemory() function
  • process_analyzer.py - Contains the ListDirectory() function
4

Verify Installation

Test that Memory Monitor works by running it:
python3 main.py
If successful, you’ll see memory statistics and the process with highest memory usage. See the Quickstart guide for details on interpreting the output.

Optional: Make It Executable

For convenience, you can make the script executable and add it to your PATH:
# Make the script executable
chmod +x main.py

# Add shebang to main.py if not present
echo '#!/usr/bin/env python3' | cat - main.py > temp && mv temp main.py
chmod +x main.py

# Run directly
./main.py

Permissions

Memory Monitor reads from the /proc filesystem, which typically requires:
  • System memory info (/proc/meminfo) - Readable by all users
  • Process information (/proc/[pid]/status) - Some processes may require root access
If you see permission errors for certain processes, this is normal. Memory Monitor will skip those processes and continue analyzing others. Run with sudo if you need complete access to all process information.

Troubleshooting

Python 3 is not installed or not in your PATH. Install Python 3 using your distribution’s package manager (see Step 1).
Ensure all three files (main.py, memory_info.py, process_analyzer.py) are in the same directory. Memory Monitor uses relative imports.
Some process directories in /proc require elevated privileges. This is expected behavior - the tool will skip those processes. Run with sudo python3 main.py if you need access to all processes.

Next Steps

Now that Memory Monitor is installed, proceed to the Quickstart guide to learn how to use it.

Build docs developers (and LLMs) love