Linux monitors video card usage and linux monitors video card usage

Source: Internet
Author: User

Linux monitors video card usage and linux monitors video card usage

When using GPU for computing, such as running Deep Learning code, we may want to be able to detect the usage of video memory in real time, But Linux generally does not have to monitor existing tools. Nvidia comes with an nvidia-smi command line tool that displays the usage of the video memory, but we cannot enter this command every 10 s. In this case, you need to use the watch command.

Watch command Introduction

What does watch do? Let's see what the system says.

1 $ whatis watch2 watch (1)-execute a program periodically, showing output fullscreen

The function is clear. Execute a command periodically and display the output in full screen.

The basic usage of watch is

1 watch [options] command

The most common parameter is-n, which is followed by the number of seconds to run the command.

Monitor video memory

We set to display the video memory every 10 s.

Watch-n 10 nvidia-smi

The result is as follows:

Still very clear

Let Linux tell jokes and Tang poetry?

The small software fortune will randomly say a proverb, famous saying, movie lines and so on each execution. Of course, they are all in English.

Similarly, fortune-zh displays a Tang poem each time it is executed.

If you have free time, you can ask Linux to talk about Tang poetry.

Watch-n 30 fortune-zh


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.