This simple metrics collection script written on Python and using psutil library, which takes off metrics from your server CPU and RAM. Has only two arguments cpu & mem.
Simply pulling the image using docker pull tflash8/docker-psutil
and run it with argument cpu or mem:
docker run -it --rm \
--name new-container \
tflash8/docker-psutil \
cpu
It runs your container and removes it after a successful execution python script.
If you run container without arguments you will see --help page such it:
Available commands | Description |
---|---|
cpu |
Print CPU metrics such system.cpu.system, system.cpu.idle and etc. |
mem |
Print RAM metrics such virt.total, virt.used and etc. |