Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

227

For Nvidia GPUs there is a tool nvidia-smi that can show memory usage, GPU utilization and temperature of GPU. There also is a list of compute processes and few more options but my graphic card (GeForce 9600 GT) is not fully supported. Sun May 13 20:02:49 2012 +------------------------------------------------------+ | NVIDIA-...


65

For linux, use nvidia-smi -l 1 will continually give you the gpu usage info, with in refresh interval of 1 second.


58

Recently I have written a simple command-line utility called gpustat (which is a wrapper of nvidia-smi) : please take a look at https://github.com/wookayin/gpustat.


54

For Intel GPU's there exists the intel-gpu-tools from http://intellinuxgraphics.org/ project, which brings the command intel_gpu_top (amongst other things). It is similar to top and htop, but specifically for the Intel GPU. render busy: 18%: ███▋ render space: 39/131072 bitstream busy: 0%: ...


34

nvidia-smi does not work on some linux machines (returns N/A for many properties). You can use nvidia-settings instead (this is also what mat kelcey used in his python script). nvidia-settings -q GPUUtilization -q useddedicatedgpumemory You can also use: watch -n0.1 "nvidia-settings -q GPUUtilization -q useddedicatedgpumemory" for continuous monitoring.


27

The following instructions are valid for CUDA 7.0, 7.5, and several previous (and probably later) versions. As far as Debian distributions, they're valid for Jessie and Stretch and probably other versions. They assume an amd64 (x86_64) architecture, but you can easily adapt them for x86 (x86_32). Installation prerequisites g++ - You should use the newest ...


15

For Linux, I use this HTOP like tool that I wrote myself. It monitors and gives an overview of the GPU temperature as well as the core / VRAM / PCI-E & memory bus usage. It does not monitor what's running on the GPU though. gmonitor


14

For completeness, AMD has two options: fglrx (closed source drivers). $ aticonfig --odgc --odgt mesa (open source drivers), you can use RadeonTop. View your GPU utilization, both for the total activity percent and individual blocks.


11

I have a GeForce 1060 GTX video card and I found that the following command give me info about card utilization, temperature, fan speed and power consumption: $ nvidia-smi --format=csv --query-gpu=power.draw,utilization.gpu,fan.speed,temperature.gpu You can see list of all query options with: $ nvidia-smi --help-query-gpu


9

You can use (tested with nvidia-smi 352.63): while true; do nvidia-smi --query-gpu=utilization.gpu --format=csv >> gpu_utillization.log; sleep 1; done. The output will be (if 3 GPUs are attached to the machine): utilization.gpu [%] 96 % 97 % 92 % utilization.gpu [%] 97 % 98 % 93 % utilization.gpu [%] 87 % 96 % 89 % utilization.gpu [%] 93 % 91 % ...


8

glxinfo | grep "OpenGL version"


8

You can configure Xorg to disable OpenGL / GLX. For a first try, you can run a second X session: switch to tty2, log in and type: startx -- :2 vt2 -extension GLX To permanently disable hardware acceleration, create a file: /etc/X11/xorg.conf.d/disable-gpu.conf with the the content: Section "Extensions" Option "GLX" "Disable" EndSection Note that ...


7

I never was able to get it to work by hand editing xorg.conf. What did work was to execute on the command line which sets it all up for you: sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration Then edit xorg.conf. For me that was sudo vi /etc/X11/xorg.conf and prepend "#" to each line containing allow-empty-initial-configuration to ...


7

KVM is normally supported already via libvirt and the kernels in modern distros without much hassle. You just need a CPU that has VT-d extensions (or AMD-V for AMD processors), and your BIOS has to have it enabled. After that, it's all about installing the necessary packages to get it going. XEN, yes, does support it. Xen is literally its own platform. A ...


6

I did a bit of excavation and found that your laptop has a flaw from the manufacturer (the NVIDIA chip, specifically) and the only solution is to do a "reflow" as explained here. You can buy a cooling pad for the time being to make the laptop life span longer, but won't solve the temperature problem. About not being able to run pwmconfig, the BIOS don't ...


6

Assuming you're using OpenGL, the GPU should be installed on the host where the X server is running. The client will send rendering commands to the X server, which will then take advantage of the GPU to process the rendering commands.


6

Update typing: nvidia-smi gives you the driver verson nowadays. Old answer: Typing nvidia-settings --version will tell you what version of the NVidia driver is currently installed (even when it's not running). lsmod | grep video will show you the running video module. modinfo szWhateverWasTheOutputOfThePreviousCommand will give you the version of the ...


6

I think you should do it using backports, I'm actually smoothly installing nvidia-cuda-toolkit 7.5 on debian jessie. Add backports, non free, to your /etc/apt/sources.list. For me (on jessie) I just put this on the bottom of my file: # jessie-backports deb http://httpredir.debian.org/debian jessie-backports main contrib non-free saved, apt-get update, and ...


5

AMD's implementation of OpenCL requires that: An X server be running on at least one of the AMD video cards in the system. Your compute jobs must run within that X server. If this is something you can't possibly do, then you should consider using different hardware, such as NVIDIA.


5

You need to unload the nouveau driver before you can load the nvidia driver. However, the nouveau driver is currently in use by the X-server, so it cannot be unloaded yet. You have to stop the X-server first (but don't just re-start it, as then it will use the nouveau driver again). So in short: stop X-server: sudo service lightdm stop unload the nouveau ...


5

use nvidia-smi dmon -i 0 -s mu -d 5 -o TD then you can easily dump this into a log file. this is the gpu usage for device 0 sampled at an interval of 5 seconds #Date Time gpu fb bar1 sm mem enc dec pwr temp #YYYYMMDD HH:MM:SS Idx MB MB % % % % W C 20170212 14:23:15 0 144 4 ...


5

As root or non-root, run lspci -v -s 84:00.0 and look at the "Subsystem" line, that will usually give you the name of the manufacturer. That uses the bus identifier you found already; for a more generic form, lspci -v | grep -A1 VGA will show the relevant information for any graphics adapter installed in your system.


5

The following is a simple method that does not require scripting, connecting fake monitors, or fiddling and can be executed over SSH to control multiple NVIDIA GPUs' fans. It has been tested on Arch Linux. Identify your cards' PCI IDs: Edit: I'm now not sure what the best method is. Previously, I suggested lspci -k | grep -A 2 -E "(VGA|3D)". However, this ...


4

A generally good experience. I did have KDE problems (some minor crashes, really rarely) with my Radeon 7870, but this never happened on Ubuntu with Unity. Installing the driver is pretty straightforward. I used the AMD installer to generate the .deb files and installed them by hand. Then I generated the config file with (aticonfig --initial), and ...


4

AMD/ATI The proprietary graphics driver ATI Catalyst Linux (also known as fglrx) supports GPU frequency scaling (ATI Overdrive). You can alter the frequencies via aticonfig command, e.g: aticonfig --od-setclocks=350,150 Run aticonfig --help or visit this page for the complete documentation. Also, note that there is no guarantee that the attempted clock ...


4

This Dockerfile from this blog post demonstrate an ideal way to get started with a Linux GUI running in a (Docker) container. A similar setup can be achieved using a CoreOS machine(s) as a host, and X11 and SSHD running inside the container. In the example I linked, the author also included software like the JRE (Java), Firefox, LibreOffice, and a Desktop/...


4

I regard the same issue as you on the Arch Linux (mesa-git, llvm-svn, linux 4.18.12 (even running 4.19.x or mainline 4.20rcx)). Stable linux kernel isn't, I would say, optimized for our gpu yet. Luckily, there is a temporary solution. I tried linux-amd-wip-git (drm-next-4.21-wip) which has the latest amd patches (there are also other kernels which have them ...


4

"Graphics driver" can mean any number of things. The way X (the graphical windowing system) works is that there is a central X server, which can load modules ("X drivers") for different hardware. Like vesa, fbdev, nvidia, nouveau, amdgpu. Some of these drivers can work on their own (vesa). Some need linux kernel drivers. Many of these kernel drivers ...


3

Just a note, the idea of the kernel having to virtualize and context-switch hundreds of GPU registers is horrifying and the kernel is doing nothing that could benefit from using them itself. There is code in the kernel to manage sharing GPU resources among processes (more of that code is migrating into the kernel steadily), and the processes that do share ...


3

I think the best way to make use of your cores in GPU is to use OpenCL. The idea is quite simple. You write a kernel (a small block of code, where you can use only basic C code without libraries). For example, if you want to filter a frame, you have to do some calculations on each pixel and that is what the kernel code will do. Then you have to compile the ...


Only top voted, non community-wiki answers of a minimum length are eligible