I have come to know that we can use watch
command to monitor the output of other command and it prints the output every 2 seconds by default, which is really useful.
I start to use it to monitor the output of nvidia-smi
, for example. But now I do not know how to quit the program (stop monitoring the output of nvidia-smi
). I tried to press q
and there is no response.
Best Answer
From
man watch
:The key words are "until interrupted", which basically can be interpreted as until (but not limited to) the following happening:
kill
request.