This is a Python script that uses the Pygame library to display the current FPS (frames per second) and system information such as GPU usage and CPU usage in a resizable window.
- Pygame
- Psutil
- sys
- Install the dependencies by running
pip install pygame psutil
in the command line. - Install package via NPM package manager
npm i @hoodedunicorn/python-fps-monitor
- Run the script using
python FPS-Monitor.py
This script is only compatible with NVidia GPUs. It will not work with other types of GPUs such as AMD or Intel. Additionally, it will only display information for the first GPU it detects. If you have multiple GPUs installed, you will need to modify the script to display information for all of them.
This code is a Python script that uses Pygame, sys, psutil, gpustat, and cpuinfo libraries to display system information in a graphical interface. The code initializes the Pygame library, sets the height and width of the window, and sets up a font for text display.The script has several functions that are responsible for getting specific system information and returning text in the form of a Pygame surface. The fpsrun() function returns the current FPS value as text.
The get_cpu_usage() function returns the CPU usage percentage, along with the CPU name, in text format with different colors depending on whether the CPU is from AMD, Intel, or any other brand.
The get_gpu_usage() and get_gpu_name() functions return the GPU usage percentage and name in text format with green color. The get_ram_info() and get_ram_usage() functions return the total RAM and the RAM usage percentage in text format with orange color.
In the main loop, the script listens for Pygame quit events, updates the screen with the system information, and updates the display 60 times per second. The script displays the FPS value, CPU name, CPU usage, GPU name, GPU usage, total RAM, and RAM usage on the screen.
✔️ = Implemented ♻️ = In testing 📝 = Working on it ❌ = Not yet available / Can't be implemente
Feature | ✔️/♻️/📝/❌ |
---|---|
RAM stats & usage | ✔️ |
CPU stats color AMD or Intel | ❌ Scrapped in Testing - Too intensive, borked FPS |
CPU temps and GPU Memory usage | 📝 |
Accessible for all GPU's | ❌ |
Be an Overlay | 📝 |
This script is a useful tool for monitoring the performance of your system while running resource-intensive applications such as games or video editing software. It is easy to install and customize, making it a valuable addition to any developer or gamer's toolbox.
To see versions click me,
to download a previous release click here
Issue | Resolved? |
---|---|
Window is very slow to change position | ✔️ 30/01/2023 EU |
FPS is not shown correctly | ✔️ 30/01/2023 EU |