Get latest NVIDIA Query Resource for OpenGL


You can query an application's OpenGL resource usage by executing the command:
nvidia-query-resource-opengl -p [-qt ]

  • pid: the process ID of the target OpenGL application of the query
  • query_type: this may be 'summary' or 'detailed'. The default is 'summary'.
    • summary: reports a summary, per device, of allocated video and system memory, the total amount of memory in use by the driver, and the total amount of allocated but unused memory.
    • detailed: includes the summary information, and additionally reports separate allocation amounts for various object types. The current set of reported object types includes:
      • SYSTEM RESERVED - driver allocated memory
      • TEXTURE - memory in use by 1D/2D/3D textures
      • RENDERBUFFER - render buffer memory
      • BUFFEROBJ_ARRAY - buffer object memory

Resource queries are handled asynchronously to the OpenGL applications being queried. Due to this, and other factors, including object migration between video and system memory, it is possible for subsequent queries to yield different results.

On Windows, Query Resource for OpenGL will communicate directly with any OpenGL application to perform resource queries; however, on Unix-like systems, the DSO must be preloaded into the target application before a resource query can be performed. This is achieved by setting a relative or absolute path to the preload DSO in the LD_PRELOAD variable of the target application's environment:

e.g.: $ LD_PRELOAD=path/to/ app