Skip to content

This program uses Pygame to create a window displaying FPS, CPU usage, and GPU usage in real-time. It uses the psutil and gpustat modules to gather data about system performance. Users can adjust the window size and font size. The window updates every second and can be closed by pressing the 'X' button.

License

Notifications You must be signed in to change notification settings

HoodedUnicorn/Python-FPS-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub release (latest SemVer) npm (scoped) npm

Python FPS and System Monitor 🎮

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.

Dependencies 📑

  • Pygame
  • Psutil
  • sys

Installation 💻

Install via NPM packages 🏭

  • 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

Limitations ⚠️

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.

Features 👾

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.

Roadmap 📆 (subject to change)

✔️ = 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 📝

Conclusion 🚀

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.

Versions 🍕

To see versions click me,

to download a previous release click here

Bugs 🐛

Issue Resolved?
Window is very slow to change position ✔️ 30/01/2023 EU
FPS is not shown correctly ✔️ 30/01/2023 EU

About

This program uses Pygame to create a window displaying FPS, CPU usage, and GPU usage in real-time. It uses the psutil and gpustat modules to gather data about system performance. Users can adjust the window size and font size. The window updates every second and can be closed by pressing the 'X' button.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages