When using the GPU for computing, such as running deep learning code, we may want to be able to detect the use of video memory in real time, but Linux generally does not bring its own monitoring of existing tools. Nvidia comes with a NVIDIA-SMI command-line tool that shows memory usage, but we can't enter this command every 10s. It's time to use the Watch command.
About Watch command
What does watch do? Look at what the system says.
1 $ whatis Watch 2 Watch (1) -Execute a program periodically, showing output fullscreen
function very clear, periodic execution of a command, and the output full-screen display
The basic usage of watch is
1 Watch [options] command
The most commonly used parameter is-n, which specifies the number of seconds to execute once per command.
Monitor video Memory
We set the video memory to show every 10s
Watch-n Nvidia-smi
Results are shown in
It's still very clear.
Let Linux tell jokes, speak Tang poetry?
Small software fortune Each execution will randomly say a proverb, famous words, movie lines, etc., of course, are English.
Similarly, fortune-zh each execution will show a Tang poem.
When you have free time, you can let Linux speak Tang poetry.
Fortune-zh
Linux Monitor Graphics usage