未加星标

Linux Find Out Video Card GPU Memory RAM Size Using Command Line

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二04 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏

I have a quick question for you, Vivek: I’m trying to find out my NVDIA display card memory size on Fedora linux. How do I find out my VIDEO Card (VGA) Memory size on Linux?

You need to use the following commands to find out graphics card (VGA) memory on Linux:

lspci command It is a utility for displaying information about all PCI buses in the system and all devices connected to them. /var/log/Xorg.0.log Xorg log file. lshw command List CPU, CPU and other hardware on Linux. glxinfo command See information about the GLX implementation on Linux on a given X display. lspci command example to find out video card (GPU) memory ram size on Linux

Open a terminal and type the lspci command to list PCI devices on Linux :

$ lspci

Output:

00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 03) 00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03) 00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 82) 00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 02) 00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 02) 00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 02) 01:00.0 Network controller: RaLink RT2561/RT61 rev B 802.11g 01:02.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11) 01:02.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11) 01:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

You need to use string called devices in the specified domain 00:02.0 VGA (highlighted in red color to display memory info):

$ lspci -v -s 00:02.0

Sample outputs:

00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03) (prog-if 00 [VGA]) Subsystem: Giga-byte Technology Unknown device 2562 Flags: bus master, fast devsel, latency 0, IRQ 177 Memory at d0000000 (32-bit, prefetchable) [size=128M] Memory at d8200000 (32-bit, non-prefetchable) [size=512K] Capabilities:

This listing shows an Intel video card with 128 MB of video RAM. If you cannot find devices in the specified domain use following command and look for your display card name and memory field:

$ lspci -v | less

Identify onboard Intel/AMD or Nvidia dedicated GPU on Linux

Simply run the following lshw command. It is a small tool to extract detailed information on the hardware configuration of the Linux machine :

$ sudo lshw -C display
Linux Find Out Video Card GPU Memory RAM Size Using Command Line
Linux Find Out Video Card GPU Memory RAM Size Using Command Line

Another option is to run the following command:

$ glxinfo | more

One can use theegrep command as follows to filter out info:

$ glxinfo | egrep -i 'device|memory'
Linux Find Out Video Card GPU Memory RAM Size Using Command Line

To get summary i.e. brief info run:

$ glxinfo -B

Sample outputs:

name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: X.Org (0x1002) Device: Radeon RX 580 Series (POLARIS10 / DRM 3.25.0 / 4.17.14-041714-generic, LLVM 6.0.0) (0x67df) Version: 18.0.5 Accelerated: yes Video memory: 4058MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 4.5 Max compat profile version: 3.0 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1 Memory info (GL_ATI_meminfo): VBO free memory - total: 4058 MB, largest block: 4058 MB VBO free aux. memory - total: 4089 MB, largest block: 4089 MB Texture free memory - total: 4058 MB, largest block: 4058 MB Texture free aux. memory - total: 4089 MB, largest block: 4089 MB Renderbuffer free memory - total: 4058 MB, largest block: 4058 MB Renderbuffer free aux. memory - total: 4089 MB, largest block: 4089 MB Memory info (GL_NVX_gpu_memory_info): Dedicated video memory: 4058 MB Total available memory: 8147 MB Currently available dedicated video memory: 4058 MB OpenGL vendor string: X.Org OpenGL renderer string: Radeon RX 580 Series (POLARIS10 / DRM 3.25.0 / 4.17.14-041714-generic, LLVM 6.0.0) OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5 OpenGL core profile shading language version string: 4.50 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL version string: 3.0 Mesa 18.0.5 OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10 Xorg log file to get the GPU info on Linux

Open a command-line terminal (select Applications > Accessories > Terminal), and then type:

$ grep -i --color memory /var/log/Xorg.0.log

Sample outputs:

(--) Aug 02 12:16:20 NVIDIA(0): Memory: 1048576 kBytes (II) Aug 02 12:16:21 NVIDIA: Using 768.00 MB of virtual memory for indirect memory access. (==) NVIDIA(0): Disabling shared memory pixmaps

The above output indicate that my Nvidia card has 1024MB ram. The following is taken from my Macbook, which has Intel GM965 Video card. It shares memory from main RAM:

$ grep -i memory /var/log/Xorg.0.log

Sample outputs:

[2318869.434] (II) intel(0): detected 15868 kB stolen memory. [2318869.472] (II) intel(0): I830CheckAvailableMemory: 1966080 kB available [2318869.486] (II) intel(0): Attempting memory allocation with tiled buffers. [2318870.197] (II) intel(0): Fixed memory allocation layout: [2318870.197] (II) intel(0): 0x00f7f000: end of stolen memory [2318870.197] (II) intel(0): 0x00f7f000-0x0fffffff: DRI memory manager (246276 kB) [2318870.197] (II) intel(0): BO memory allocation layout: [2318870.197] (II) intel(0): 0x00f7f000: start of memory manager [2318870.197] (II) intel(0): 0x10000000: end of memory manager Conclusion

You must use combination of various Linux commands to find out video card (GPU) memory (RAM) size and make of card. I strongly suggest that you read the following man pages:

$ man glxinfo $ man lspci $ man lshw

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics viaRSS/XML feed or weekly email newsletter .

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

tags: memory,ICH4,rev,Intel,MB,Linux,Corporation,profile,Controller,II
分页:12
转载请注明
本文标题:Linux Find Out Video Card GPU Memory RAM Size Using Command Line
本站链接:https://www.codesec.net/view/586952.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(76)