Closed Captioning Closed captioning available on our YouTube channel

How to use the sar command: 2-Minute Linux Tips

Network World | Oct 8, 2021

In this Linux tip, learn how to use the sar command. The name "sar" stands for "system activity report". It provides details on all aspects of system performance including system load, CPU usage, memory use, paging, swapping, disk usage, device load, network activity and so on.

Copyright © 2021 IDG Communications, Inc.

Similar
Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on NetworkWorld.
In this Linux tip, we’re going to look at the sar command. The name "sar" stands for "system activity report". It provides details on all aspects of system performance including system load, CPU usage, memory use, paging, swapping, disk usage, device load, network activity and so on.
It can report on current performance or pull data from the /var/log/sa or /var/log/systat files (depending on your distribution). To see if it’s available:
By default, sar displays recent CPU stats. Just type "sar". To make this quick, I will ask sar to provide two 5-second reports on CPU usage.
The column headings show we're looking at all CPUs, the time spent on user processes, system processes, etc. We see in this example that the CPUs are mostly idle – waiting for things to do.
The next command pulls data on memory usage with three 5-second reports.
This (above) command gives you an idea how much memory is free and in use. Try sar --help to get a listing will provide explanations of the many command options. Notice that only a small portion of available memory is being used.
That’s your Linux tip for the sar command.
If you have questions or would like to suggest a topic, please add a comment below. And don’t forget to subscribe to the IDG Tech(talk) channel on YouTube.
If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.
Popular
Featured videos from IDG.tv