Forrest logo
back to the sar tool

sar:tldr:413a9

sar: Report a total of 20 memory utilization statistics, one per second.
$ sar -r ALL ${1} ${20}
try on your machine

The command "sar -r ALL ${1} ${20}" is a command-line instruction in a Unix-like operating system that utilizes the "sar" command to retrieve and display system activity information related to memory and resource utilization.

Here is a breakdown of the different parts of the command:

  • "sar": This is the command itself, which stands for "system activity reporter." It is used to collect, report, and monitor system activity statistics.

  • "-r": This flag is an option for the "sar" command that specifies the memory-related statistics to be displayed. In this case, it indicates that the command will focus on memory-related information.

  • "ALL": This parameter is used to specify that the "sar" command should provide statistics for all available memory components, such as physical memory, swap space, and buffer/cache usage.

  • "${1}" and "${20}": These are command-line arguments that are being passed to the command. "${1}" refers to the first argument provided when executing the script or command, and "${20}" refers to the twentieth argument. The actual values of these arguments would depend on how the script or command is being used.

Overall, this command with the given options and arguments would display memory-related system activity statistics for all available memory components, based on the values of the first and twentieth command-line arguments provided when executing the command.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the sar tool