Help Center/ ModelArts/ FAQs/ Notebook (New Version)/ Others/ How Do I View GPU Usage on the Notebook?
Updated on 2024-06-11 GMT+08:00

How Do I View GPU Usage on the Notebook?

If you select GPU when creating a notebook instance, perform the following operations to view GPU usage:

  1. Log in to the ModelArts management console, and choose DevEnviron > Notebooks.
  2. In the Operation column of the target notebook instance in the notebook list, click Open to go to the Jupyter page.
  3. On the Files tab page of the Jupyter page, click New and select Terminal. The Terminal page is displayed.
  4. Run the following command to view GPU usage:
    nvidia-smi
  5. Check which processes in the current notebook instance use GPUs.

    Method 1:

    python /modelarts/tools/gpu_processes.py

    The following figure shows the case that the current process is using GPUs.

    The following figure shows the case that the current process is not using GPUs.

    Method 2:

    Open /resource_info/gpu_usage.json and view the processes that are using GPUs.

    If no process is using GPUs, the file may be unavailable or empty.