Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
nvidia-smi is a command-line utility provided by NVIDIA that allows users to monitor and manage NVIDIA GPU devices installed on a system. It provides information about GPU utilization, temperature, power consumption, and memory usage. This tool is particularly important for Linux users who rely on NVIDIA GPUs for various tasks such as machine learning, data processing, and gaming.
To use nvidia-smi in the Linux environment, you need to have the NVIDIA driver installed on your system. The driver provides the necessary interface to communicate with the GPU devices. You can check if the driver is installed by running the following command in the terminal:
nvidia-smi
If the command executes successfully and displays GPU information, it means the NVIDIA driver is installed. Otherwise, you need to install the driver using the appropriate method for your Linux distribution. NVIDIA provides detailed instructions for driver installation on their website.
Once the driver is installed, you can use nvidia-smi to monitor and manage your GPU devices. Here are some common examples of using nvidia-smi in Linux:
nvidia-smi
This command will show GPU utilization, memory usage, temperature, power consumption, and other relevant information for each GPU.
watch -n 1 nvidia-smi
This will refresh the GPU utilization information every second.
nvidia-smi --gpu-reset -i <GPU_INDEX> -r
Replace <GPU_INDEX>
with the index of the GPU device you want to limit the memory usage for. This command will reset the GPU and limit the memory usage for the specified GPU.
nvidia-smi -i <GPU_INDEX> -a [fan: <FAN_SPEED>]
Replace <GPU_INDEX>
with the index of the GPU device you want to set the fan speed for, and <FAN_SPEED>
with the desired fan speed percentage. This command will adjust the fan speed accordingly.