An alternative to "watch" command in Windows

When I’m training a network in Linux, I always have a panel in my tmux that is showing the GPU usage over all 4 GPUs. To do so, I use nvidia-smi command and to keep it updating I use watch command. So, all I need to write is:

watch nvidia-smi

In windows you do not have the watch command and note that nvidia-smi might not be part of your path but if you have installed everything correctly, it should be here:

C:\Program Files\NVIDIA Corporation\NVSMI

So, the alternative to watch in windows Powershell is using the while command:

while (1) {cls; .\nvidia-smi.exe; sleep 5}

However, someone made a module for Powershell, but I find it inconvenient.

Comments