< GeeXLab Reference Guide />

> Back to Reference Guide Index


gh_gml library

Description

gh_gml is the GPU monitoring module. It is available for Windows, Linux, macOS and monitors NVIDIA GeForce/Quadro and AMD Radeon graphics cards.


Number of functions: 24

  1. gh_gml.geforce_logo_get_illumination ()
  2. gh_gml.geforce_logo_is_illumination_supported ()
  3. gh_gml.geforce_logo_set_illumination ()
  4. gh_gml.get_all_limiting_policies ()
  5. gh_gml.get_clocks ()
  6. gh_gml.get_fan_speed ()
  7. gh_gml.get_gpu_codename ()
  8. gh_gml.get_gpu_config ()
  9. gh_gml.get_gpu_cores ()
  10. gh_gml.get_gpu_driver ()
  11. gh_gml.get_gpu_fullname ()
  12. gh_gml.get_num_gpus ()
  13. gh_gml.get_pci_identifiers ()
  14. gh_gml.get_temperatures ()
  15. gh_gml.get_usages ()
  16. gh_gml.gpu_power_get_current_value ()
  17. gh_gml.gpu_power_get_power_limit ()
  18. gh_gml.amd_get_overdrive_version ()
  19. gh_gml.amd_get_temperatures_rdna ()
  20. gh_gml.amd_get_power_rdna ()
  21. gh_gml.get_gpu_architecture ()
  22. gh_gml.amd_ags_get_gpu_info ()
  23. gh_gml.get_gpu_driver_v2 ()
  24. gh_gml.get_memory_info_v2 ()



geforce_logo_get_illumination

Description

GTX 600/700: gets the current illumination value of the GeForce GTX LED logo.


Syntax

illum_value = gh_gml.geforce_logo_get_illumination(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


illum_value = gh_gml.geforce_logo_get_illumination(0)
			


geforce_logo_is_illumination_supported

Description

GTX 600/700: checks whether the GeForce GTX LED logo is supported.


Syntax

is_supported = gh_gml.geforce_logo_is_illumination_supported(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


is_supported = gh_gml.geforce_logo_is_illumination_supported(0)
			


geforce_logo_set_illumination

Description

GTX 600/700: sets the current illumination value of the GeForce GTX LED logo.


Syntax

gh_gml.geforce_logo_set_illumination(
 gpu_index,
 illum_value
)

Languages


Parameters


Return Values

This function has no return value(s).


Code sample


gh_gml.geforce_logo_set_illumination(0, illum_value)
			


get_all_limiting_policies

Description

Gets all policies that limits the GPU power (NVIDIA GPUs).


Syntax

power, temperature, voltage, overvoltage = gh_gml.get_all_limiting_policies(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


power, temperature, voltage, overvoltage = gh_gml.get_all_limiting_policies(0)

if (temperature == 1) then
    print("Limiting policy: temperature")
end
			


get_clocks

Description

Gets the GPU core and memory clock speeds.


Syntax

core_clock, mem_clock = gh_gml.get_clocks(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


core_clock, mem_clock = gh_gml.get_clocks(0)
			


get_fan_speed

Description

Gets the GPU fan speed.


Syntax

percent, rpm = gh_gml.get_fan_speed(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


percent, rpm = gh_gml.get_fan_speed(0)
			


get_gpu_codename

Description

Gets the GPU codename.


Syntax

name = gh_gml.get_gpu_codename(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


codename = gh_gml.get_gpu_codename(0)
			


get_gpu_config

Description

Gets the GPU config: cores, TMUs and ROPs.


Syntax

cores, tmus, rops = gh_gml.get_gpu_config(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


cores, tmus, rops = gh_gml.get_gpu_config(gpu_index)
			


get_gpu_cores

Description

Gets the shader cores of the GPU.


Syntax

num_cores = gh_gml.get_gpu_cores(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


cores = gh_gml.get_gpu_cores(0)
			


get_gpu_driver

Description

Gets the GPU driver.


Syntax

name = gh_gml.get_gpu_driver(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


driver_name = gh_gml.get_gpu_driver(0)
			


get_gpu_fullname

Description

Gets the GPU name.


Syntax

name = gh_gml.get_gpu_fullname(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


gpu_name = gh_gml.get_gpu_fullname(0)
			


get_num_gpus

Description

Returns the number of GPUs.


Syntax

num_gpus = gh_gml.get_num_gpus()

Languages


Parameters

This function has no input parameter(s).


Return Values


Code sample


num_gpus = gh_gml.get_num_gpus()
			


get_pci_identifiers

Description

Gets the PCI identifiers of the GPU (device and subdevice IDs).


Syntax

vendorID, deviceID, subvendorID, subdeviceID = gh_gml.get_pci_identifiers(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


vendorID, deviceID, subvendorID, subdeviceID = gh_gml.get_pci_identifiers(0)
			


get_temperatures

Description

Gets the GPU core, mem, board and VRM temperatures if available.


Syntax

gpu, mem, pcb, vrm = gh_gml.get_temperatures(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


gpu, mem, pcb, vrm = gh_gml.get_temperatures(0)
			


get_usages

Description

Gets the GPU core and memory usages.


Syntax

core_usage, mem_usage = gh_gml.get_usages(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


core_usage, mem_usage = gh_gml.get_usages(0)
			


gpu_power_get_current_value

Description

GTX 600/700: returns the current GPU power.


Syntax

power = gh_gml.gpu_power_get_current_value(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


power = gh_gml.gpu_power_get_current_value(0)
			


gpu_power_get_power_limit

Description

GTX 600/700: returns the power limit (or power target) of the GPU.


Syntax

power = gh_gml.gpu_power_get_power_limit(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


power_target = gh_gml.gpu_power_get_power_limit(0)
			


amd_get_overdrive_version

Description

Returns the overdrive version. For example, the overdrive is 8 for Navi GPUs.


Syntax

ver = gh_gml.amd_get_overdrive_version(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


ver = gh_gml.amd_get_overdrive_version(gpu_index)
			


amd_get_temperatures_rdna

Description

Returns the temperatures of a Navi / RDNA graphics card.


Syntax

gpu, mem, hotstop = gh_gml.amd_get_temperatures_rdna(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


gpu, mem, hotstop = gh_gml.amd_get_temperatures_rdna(gpu_index)
			


amd_get_power_rdna

Description

Returns the power consumption in Watts of a Navi / RDNA graphics card.


Syntax

asic, soc = gh_gml.amd_get_power_rdna(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


asic, soc = gh_gml.amd_get_power_rdna(gpu_index)
			


get_gpu_architecture

Description

Returns the GPU architecture for recent graphics cards (NVIDIA or AMD). For example: Maxwell, Turing, GCN1, Vega or RDNA.


Syntax

arch = gh_gml.get_gpu_architecture(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


arch = gh_gml.get_gpu_architecture(gpu_index)
			


amd_ags_get_gpu_info

Description

Returns some GPU information for AMD Radeon GPUs.


Syntax

num_cus, num_wgps, num_rops, core_clock, mem_clock = gh_gml.amd_ags_get_gpu_info(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


num_cus, num_wgps, num_rops, core_clock, mem_clock = gh_gml.amd_ags_get_gpu_info(gpu_index)
			


get_gpu_driver_v2

Description

Gets graphics driver information.


Syntax

driver_name, driver_version = gh_gml.get_gpu_driver_v2(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


driver_name, driver_version = gh_gml.get_gpu_driver_v2(gpu_index)
			


get_memory_info_v2

Description

Gets memory size information. Currently on NVIDIA only.


Syntax

memory_size_mb, cur_available_memory_size_mb = gh_gml.get_memory_info_v2(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


memory_size_mb, cur_available_memory_size_mb = gh_gml.get_memory_info_v2(gpu_index)
			






GeeXLab Rootard Guide | Downloads | Contact | Newsletter