Comments (5)
glxinfo
from mesa-utils
appears to provide the GPU memory at least.
> glxinfo -B
name of display: :1
display: :1 screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 4096 MB
Total available memory: 4096 MB
Currently available dedicated video memory: 3105 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 535.129.03
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6.0 NVIDIA 535.129.03
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 535.129.03
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
I don't have an AMD GPU to test this out. @tumist could you confirm if the tool works in AMD too? Also if someone got intel graphics to compare too, would be helpful.
If it works I can open a PR regarding this.
from tophat.
There is currently no unified API to get these measurements. Ideally they would come from libgtop, and although there was an attempt to add GPU usage to libgtop it was not merged.
My computer has an AMD graphics card and it's rather easy to get measurements from the amdgpu driver through sysfs. I don't have access to a computer with an nvidia graphics card (and even so there are at least two different drivers, no?) so I can't work on that.
from tophat.
You may take a look at this repo for Nvidia implementation:
https://github.com/UshakovVasilii/gnome-shell-extension-freon/blob/55bcd7c48181c8c18a9210828b8723ac3fe1d4c7/freon%40UshakovVasilii_Github.yahoo.com/nvidiaUtil.js#L142
Although there are no standard tooling I think you can probably call libgtop for the gpu vendor info. Or just check for availability of GPU specific CLI tools. Next call the corresponding tools for info.
from tophat.
Also I got an NVIDIA driver here's all the GPU info options you can poll:
https://gist.github.com/sansmoraxz/8a98d987f12d7edc983d611b8326fc67
Hope it helps.
from tophat.
It works with an AMD GPU too, here is what I got:
> glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD Radeon RX 7900 XT (gfx1100, LLVM 16.0.6, DRM 3.54, 6.6.7-100.fc38.x86_64) (0x744c)
Version: 23.1.9
Accelerated: yes
Video memory: 20480MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 19821 MB, largest block: 19821 MB
VBO free aux. memory - total: 15932 MB, largest block: 15932 MB
Texture free memory - total: 19821 MB, largest block: 19821 MB
Texture free aux. memory - total: 15932 MB, largest block: 15932 MB
Renderbuffer free memory - total: 19821 MB, largest block: 19821 MB
Renderbuffer free aux. memory - total: 15932 MB, largest block: 15932 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 20480 MB
Total available memory: 36486 MB
Currently available dedicated video memory: 19821 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 7900 XT (gfx1100, LLVM 16.0.6, DRM 3.54, 6.6.7-100.fc38.x86_64)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.1.9
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.1.9
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.1.9
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
from tophat.
Related Issues (20)
- CPU Monitor: all the cores being bunched into one long bar instead of showing each core separately. HOT 1
- Top Bar Icons Float to the Right After Resuming from Suspend HOT 1
- Conflicting Icon Position When Another Extension is Installed
- TopHat causes composition stuttering when updating (Wayland) HOT 2
- Error: Requiring GTop, version none: Typelib file for namespace 'GTop' (any version) not found HOT 11
- One CPU core always showing 100% HOT 1
- Support for Gnome 45 HOT 12
- units instead of percent
- the extension didn't appear in the gnmoe-extensions-app
- [BUG] System lag every 5 seconds HOT 2
- is it possible to show summed io activity of all disks?
- [Bug] Disk activity usage meter doesn't show in the menu bar
- Graphs are cleared after screen has been locked/unlocked
- [Enhancement] Show 'total received' and 'total sent' in the network stats
- [Feature request] Option to hide buttons for gnome-system-monitor and extension settings
- [enhancement] Add option to hide network monitoring if the device is not connected to the network
- How can I install gir1.2-gtop-2.0 in Alpine Linux
- Showing unsupported version in Gnome 46 HOT 1
- Error loading tophat extension: Clutter typelib file not found HOT 4
- cpu temperature showing as n/a HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tophat.