How to get the GPU info?
I do not know of a direct equivalent, but lshw should give you the info you want, try:
(it also works without sudo but the info may be less complete/accurate)
You can also install the package lshw-gtk to get a GUI.
Any updates? I’m a fan of the command but the only clock rate (frequency) it seems to provide for me is the base bus clock 33MHz. I’m attempting to bring this Q&A up to date. Thank you!
Apologies, new to Deep Learning. What should it say if I have a GPU? It says product: 2nd Generation Core Processor Family Integrated Graphics Controller
@Nathan That means that you have a GPU. probably a very weak GPU. Your GPU says integrated graphics , which means that it’s integrated into the CPU. Your CPU has it own component which functions as a graphics card and probably (to save on costs) uses the ordinary RAM to store its buffers. You do not have a separate independent removable graphics card.
This doesn’t (always?) give the memory for discrete NVidia cards on certain laptops (like the HP G7 Firefly)
That type of information is non-standard, and the tools you will use to gather it vary widely.
The command glxinfo will give you all available OpenGL information for the graphics processor, including its vendor name, if the drivers are correctly installed.
To get clock speed information, there is no standard tool.
- For ATI/AMD GPUs running the old Catalyst driver, aticonfig —odgc should fetch the clock rates, and aticonfig —odgt should fetch the temperature data. I’m not familiar with AMDGPU-Pro, but a similar tool should exist.
- For NVIDIA GPUs, the nvidia-smi tool will show all of the information you could want, including clock speeds and usage statistics.
I am not aware of an equivalent tool for the open source drivers or for Intel or other GPUs, but other information on the hardware can be fetched from the lspci and lshw tools.
aticonfig doesn’t appear to be available since the retirement of fglrx. nvclock also appears to have been abandoned since the last version was for trusty. Do you have any updated solutions? Here’s what I have so far..
A blog post focusing on work done on the command-line is here:
lspci | grep ' VGA ' | cut -d" " -f 1 03:00.0
You can then use this output with lspci again, forming two nested commands
lspci -v -s $(lspci | grep ' VGA ' | cut -d" " -f 1)
If you have more than 1 GPU card, try this equivalent command instead:
lspci | grep ‘ VGA ‘ | cut -d» » -f 1 | xargs -i lspci -v -s <>
03:00.0 VGA compatible controller: NVIDIA Corporation G98 [Quadro NVS 295] (rev a1) (prog-if 00 [VGA controller]) Subsystem: NVIDIA Corporation Device 062e Flags: bus master, fast devsel, latency 0, IRQ 24 Memory at f6000000 (32-bit, non-prefetchable) [size=16M] Memory at ec000000 (64-bit, prefetchable) [size=64M] Memory at f4000000 (64-bit, non-prefetchable) [size=32M] I/O ports at dc80 [size=128] [virtual] Expansion ROM at f7e00000 [disabled] [size=128K] Capabilities: Kernel driver in use: nvidia
EDIT: You can avoid the by launching with sudo
So, (prefetchable) [size=64M) indicates that I have a 64-MB NVIDIA card. However, I don’t, it’s rather 256 MB. Why? See below.
To see how to get the most info and performance out of it, read an extremely comprehensive article on the Arch-Linux Wiki
For nvidia users, start with
(This works with the Nvidia drivers installed,but not with systems running the open-source ‘nouveau’ driver).
Thu Dec 19 10:54:18 2013 +------------------------------------------------------+ | NVIDIA-SMI 5.319.60 Driver Version: 319.60 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro NVS 295 Off | 0000:03:00.0 N/A | N/A | | N/A 73C N/A N/A / N/A | 252MB / 255MB | N/A Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Compute processes: GPU Memory | | GPU PID Process name Usage | |=============================================================================| | 0 Not Supported | +-----------------------------------------------------------------------------+
This indicates that I have a 256 MB GDDR3 Graphics card.
At this time, I don’t know how to get this for Intel and AMD/ATI GPUs.
Run google-chrome and navigate to the URL about:gpu . If chrome has figured out how to use OpenGL, you will get extremely detailing information about your GPU.
Clever. Along these lines I additionally went to chromeexperiments.com to see the performance there. Smooth as butter — I’m definitely on gpu
Because you specified a command like cat for CPU’s this is therefore the equivalent for GPU’s. Specifically for Nvidia cards. It requires no software except the Nvidia device driver to be loaded.
The path here works for the cards I have. But yours may differ as others have pointed out in the comments.
> cat /proc/driver/nvidia/gpus/0/information Model: GeForce GTX 680 IRQ: 24 GPU UUID: GPU-71541068-cded-8a1b-1d7e-a093a09e9842 Video BIOS: 80.04.09.00.01 Bus Type: PCIe DMA Size: 40 bits DMA Mask: 0xffffffffff Bus Location: 0000:01.00.0
> cat /proc/driver/nvidia/gpus/1/information Model: GeForce GTX 580 IRQ: 33 GPU UUID: GPU-64b1235c-51fc-d6f1-0f0e-fa70320f7a47 Video BIOS: 70.10.20.00.01 Bus Type: PCIe DMA Size: 40 bits DMA Mask: 0xffffffffff Bus Location: 0000:08.00.0
This is the only correct answer in on-demand cloud/HPC cluster environment on which glxinfo or lspci both fail (the former because there’s no OpenGL and display, the latter because the nVidia graphics card is abstracted by a graphics controller like Matrox G200eW3). The folder name under gpus is 0000:3b:00.0 or 0000:d8:00.0 for me, so we should type: cat /proc/driver/nvidia/gpus/0000:3b:00.0/information . The lovely Tesla V100-PCIE-16GB model shows that the qsub job limit is satisfied as desired.
sudo apt-get install clinfo clinfo
is the analogue of glxinfo but for OpenCL, my GPU setup is described at: https://stackoverflow.com/questions/7542808/how-to-compile-opencl-on-ubuntu/33483311#33483311 The output contains my GPU model among other things:
Number of devices 1 Device Name Quadro M1200
Ubuntu 20.04 Settings -> About
You can either open settings by clicking on top right menu, or you can just do:
So under «Graphics» I can see that my GPU model is
Some other things it can show:
- «Software Rendering» (Ubuntu 23.10): graphics card not working at all
- «NV117»: I think this means it is using Nouveau
nvidia-settings
Mixes runtime with some static info.
This is perfect — this answer deserved more upvotes. I think the other answers were more catered towards lower-level technical information about the GPU, whereas this option is much more consumer-friendly (since it resembles the Nvidia Control Panel program everyone on Windows is familiar with).
I do believe the best option for this is neofetch.
# Get neofetch sudo add-apt-repository ppa:dawidd0811/neofetch sudo apt update sudo apt install neofetch # Run neofetch neofetch
This gives an output like this:
I’m not seeing the video card frequency and memory in this answer. There are far simpler methods to obtain the model of GPU which appears to be all you are giving us. I’m not sure what this adds to the existing answers.
This is really not that complex For model and memory, here’s a 1 liner that works for every video card I’ve tested it on regardless of manufacturer (Intel, AMD, NVIDIA):
GPU=$(lspci | grep VGA | cut -d «:» -f3);RAM=$(cardid=$(lspci | grep VGA |cut -d » » -f1);lspci -v -s $cardid | grep » prefetchable»| cut -d » VGA» and feeds that as a request for -v verbose output from lspci for that specific -s device, further filtering the output by grep for the string » prefetchable» as this contains the memory on the card itself (note the preceding space as we don’t want to match «non-prefetchable» in our output.
For clock rate on Intel integrated graphics (Tested on I3 and I5)
execute the command sudo find /sys -type f -name gt_cur* -print0 | xargs -0 cat This dives into the /sys tree to locate the gt_cur_freq_mhz file which on my I3 is /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_cur_freq_mhz and prints the content. which in my case under extremely light load is 350 as in 350 MHz which corresponds to the minimum frequency found in /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_min_freq_mhz and when running glxgears and glmark2 results in 1050 as in 1050 MHz which corresponds to the maximum frequency found in /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_max_freq_mhz
For clock rates on nvidia cards:
nvidia-smi -stats -d procClk corresponds to the GPU clock nvidia-smi -stats -d memClk corresponds to the memory clock.
Note: I am unable to test the above as my trusty GeForce 210 isn’t supported and this works only on Kepler or newer GPUs as indicated by `nvidia-smi -stats —help’
I do not currently have any solutions for clock rate on AMD cards and do not have the hardware available for testing. I will however say that to the best of my knowledge the aticonfig mentioned in the accepted answer no longer exists and it appears that nvclock isn’t available for anything since trusty.
Как узнать какая видеокарта установлена в вашем компьютере
Будь то Nvidia. Radeon или Intel, все они могут иметь некоторые проблемы в операционных системах Linux. И когда вы решите устранить неполадки с графикой, первое что вы захотите узнать, – какая установлена видеокарта в вашей системе.
В Linux есть несколько команд для проверки информации об оборудовании. Вы можете использовать их чтобы проверить какая у вас видеокарта. Позвольте мне показать вам пару команд для получения информации о GPU в Linux.
Информация о видеокарте из терминала
Используйте команду lspci для поиска видеокарты
Команда lspci отображает информацию об устройствах, подключенных через шины PCI (периферийное компонентное соединение). По сути, эта команда дает вам подробную информацию обо всех периферийных устройствах вашей системы от клавиатуры и мыши до звука, сетевых и графических карт.
По умолчанию у вас будет огромный список таких периферийных устройств. Вот почему вам нужно отфильтровать вывод для видеокарты с помощью команды grep следующим образом:
Эта команда должна показать одну строку информации о вашей видеокарте:
[email protected]:~$ lspci | grep VGA 01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] (rev a1)
Как видите, в моей системе установлена видеокарта GeForce GTX 1060 3GB.
Как получить подробную информацию о видеокарте с помощью команды lshw в Linux
Команда lspci достаточно хороша, чтобы увидеть какая у вас видеокарта, но она вам мало о чем скажет. Вы можете использовать команду lshw, чтобы получить больше информации.
Эта команда требует, чтобы у вас был root-доступ. Вам нужно указать что вы ищете именно информацию о видеокарте следующим образом:
И, как вы можете видеть в выводе ниже, эта команда дает больше информации о видеокарте, такой как частота, драйвер и т. д.
[email protected]:~$ sudo lshw -C video *-display описание: VGA compatible controller продукт: GP106 [GeForce GTX 1060 3GB] производитель: NVIDIA Corporation физический ID: 0 сведения о шине: [email protected]:01:00.0 версия: a1 разрядность: 64 bits частота: 33MHz возможности: pm msi pciexpress vga_controller bus_master cap_list rom конфигурация: driver=nvidia latency=0 ресурсы: IRQ:32 память:f6000000-f6ffffff память:e0000000-efffffff память:f0000000-f1ffffff ioport:e000(размер=128) память:c0000-dffff
Бонусный совет: проверьте видеокарту с помощью стандартных средств системы
Дело не в том, что вы должны использовать командную строку для поиска информации о видеокарте в Linux. Большинство дистрибутивов Linux (или, я бы сказал окружение рабочего стола) предоставляют важные детали в приложении настроек.
Вы также можете использовать те же команды, чтобы найти свой сетевой адаптер и информацию о процессоре в Linux.
Если у вас есть вопросы или предложения, не стесняйтесь писать комментарии.