![Forrest logo](/images/logo.png)
pidstat:tldr:41210
pidstat: Show page faults and memory utilization.
$ pidstat -r
try on your machine
The command "pidstat -r" is used to display the memory statistics for running processes on a Linux system.
Here is the breakdown of each component of the command:
- "pidstat": It is the name of the command-line tool used to monitor process-level resource utilization.
- "-r": It is the option or flag used with pidstat to specify that memory statistics should be displayed. '-r' stands for "memory utilization and page fault statistics."
When you execute the "pidstat -r" command, it will provide you with a table of information about each running process on the system, including the memory-related statistics such as average and current memory usage, major and minor faults, and more.
The output might include columns such as:
- "PID": Process ID
- "minflt/s": Minor faults per second (Number of minor page faults incurred by a process)
- "majflt/s": Major faults per second (Number of major or uncorrectable page faults incurred by a process)
- "VSZ": Virtual memory size (Total virtual memory usage by a process)
- "%MEM": Percentage of memory used by a process
- "%CPU": Percentage of CPU used by a process
By running "pidstat -r" command at regular intervals, you can monitor memory usage patterns and identify processes that are consuming excessive memory resources.
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.