Sign inSign up

10301998/python3_system_resource_monitor

By 10301998

Updated about 2 years ago

Memory Monitoring Tool

Image
Internet of things
Developer tools
Monitoring & observability
0

160

10301998/python3_system_resource_monitor repository overview

file for your Docker image:

# Python3 CPU and RAM Usage Checker

This Docker image is designed to monitor the CPU and RAM usage of the python3 script process on your system. It provides a simple way to check these metrics using Docker.

## Prerequisites

- Docker installed on your system
- The python3 script should run on your system [Workes for python3 not python]

## Getting Started

### Build the Docker Image

If you haven't already built the Docker image, you can build it using the following command:

docker build -t python3_memory_monitoring_tool:v1 .

Running the Docker Container

To run the Docker container and check the CPU and RAM usage of Python3 scripts, use the following command:

docker run --rm -it --pid=host --privileged -v /proc:/proc 10301998/python3_system_resource_monitor:v1

Use the new Version for the better experience

docker run --rm -it --pid=host --privileged -v /proc:/proc 10301998/python3_system_resource_monitor:v2

Explanation of the Command

--rm: Automatically remove the container when it exits
-it: Run the container in interactive mode with a pseudo-TTY
--pid=host: Use the host's PID namespace, allowing the container to access the host's process information
--privileged: Give extended privileges to the container
-v /proc:/proc: Mount the host's /proc directory to the container's /proc directory

Checking Python3 scripts Usage

Once the container is running, it will monitor and display the CPU and RAM usage of the Run python3 scripts process on your system. The output will be shown in the terminal. Notes

Ensure that python3 scripts are running on your system before starting the container.
The container needs extended privileges and access to the host's PID namespace to monitor the Python3 scripts.

Stopping the Container

To stop the container, simply press Ctrl+C in the terminal where the container is running. The --rm option ensures that the container is automatically removed after it exits.

License

This project is licensed under the MIT License - see the LICENSE file for details. Acknowledgments

Docker for containerization
Your favorite code editor for making development easier

Tag summary

Content type

Image

Digest

sha256:87200f2e4

Size

58.6 MB

Last updated

about 2 years ago

docker pull 10301998/python3_system_resource_monitor:v2