Quick Links
  • Homepage
        - Overview
        - Download
        - Screenshots
        - Community
  • Code Sample Pack
  • Reference Guide
  • Changelog
  • Overview of GLSL Hacker
  • Live Coding
  • Hack your first GLSL Code
  • Moon3D




  • GLSL Hacker Articles

    > Compute shaders on Radeon
    > Distance functions in GLSL
    > GLSL Interpolation Qualifiers
    > Tessellation Spacing Modes
    > Normal Visualizer with GS
    > 3D Surface Plots
    > Normal Mapping
    > Circle and Disc in GLSL
    > PhysX 3 Flag Demo
    > GLSL Hacker on Raspberry Pi
    GLSL Hacker

    Reference Guide
    Host-API Lua / Python



    Back to Homepage
    Back to Developer's Guide Index

    gh_gml Library


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

    Number of functions: 15

    gh_gml.get_num_gpus

    Description
    Returns the number of GPUs.

    Languages: Lua - Python

    Return Values
  • num_gpus [INTEGER]: number of GPUs

    Code sample :

    num_gpus = gh_gml.get_num_gpus()


    gh_gml.get_gpu_fullname

    Description
    Gets the GPU name.

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • name [STRING]: name of the GPU, ex: GeForce GTX 780.

    Code sample :

    name = gh_gml.get_gpu_fullname(0)


    gh_gml.get_gpu_codename

    Description
    Gets the GPU codename.

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • name [STRING]: codename of the GPU, ex: GK110.

    Code sample :

    codename = gh_gml.get_gpu_codename(0)


    gh_gml.get_pci_identifiers

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

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • vendor_id, device_id, subvendor_id, subdevice_id [INTEGER]: PCI identifiers

    Code sample :

    vendor_id, device_id, subvendor_id, subdevice_id = gh_gml.get_pci_identifiers(0)


    gh_gml.get_gpu_cores

    Description
    Gets the shader cores of the GPU.

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • cores [INTEGER]: number of cores

    Code sample :

    cores = gh_gml.get_gpu_cores(0)


    gh_gml.get_clocks

    Description
    Gets the GPU core and memory clock speeds.

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • core_clock, mem_clock [INTEGER]: clock speeds

    Code sample :

    core_clock, mem_clock = gh_gml.get_clocks(0)


    gh_gml.get_usages

    Description
    Gets the GPU core and memory usages.

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • core_usage, mem_usage [INTEGER]: usages

    Code sample :

    core_usage, mem_usage = gh_gml.get_usages(0)


    gh_gml.get_fan_speed

    Description
    Gets the GPU fan speed.

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • percent, rpm [INTEGER]: speed in percent and RPM

    Code sample :

    percent, rpm = gh_gml.get_fan_speed(0)


    gh_gml.get_fan_speed

    Description
    Gets the GPU fan speed.

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • percent, rpm [INTEGER]: speed in percent and RPM

    Code sample :

    percent, rpm = gh_gml.get_fan_speed(0)


    gh_gml.get_temperatures

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

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • gpu, mem, pcb, vrm [INTEGER]: temperatures in degrees

    Code sample :

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


    gh_gml.gpu_power_get_current_value

    Description
    GTX 600/700: returns the current GPU power.

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • power [INTEGER]: power in percent

    Code sample :

    power = gh_gml.gpu_power_get_current_value(0)


    gh_gml.gpu_power_get_power_limit

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

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • power [INTEGER]: power in percent

    Code sample :

    power_target = gh_gml.gpu_power_get_power_limit(0)


    gh_gml.geforce_logo_is_illumination_supported

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

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • is_supported [INTEGER]: 1: supported, 0: not supported

    Code sample :

    is_supported = gh_gml.geforce_logo_is_illumination_supported(0)


    gh_gml.geforce_logo_get_illumination

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

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].

    Return Values
  • illum_value [REAL]: logo illumination value

    Code sample :

    illum_value = gh_gml.geforce_logo_get_illumination(0)


    gh_gml.geforce_logo_set_illumination

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

    Languages: Lua - Python

    Parameters
  • gpu_index [INTEGER]: index of the GPU: [0; num_gpus-1].
  • illum_value [REAL]: logo illumination value

    Code sample :

    gh_gml.geforce_logo_set_illumination(0, illum_value)





  • (C)2012-2014 Geeks3D