Linux Display System Statistics Gathered From /proc

https://w‮al.ww‬utturi.com
Linux Display System Statistics Gathered From /proc

To display system statistics gathered from the /proc filesystem in Linux, you can use the "vmstat" command.

The /proc filesystem is a virtual filesystem that provides information about the system's hardware and running processes. The "vmstat" command reads this information and displays various statistics about the system's memory, CPU, and I/O activity.

For example, to display real-time system statistics every 2 seconds, you can use the following command:

vmstat 2

This will display output like this:

procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 236520  55412 671748    0    0     4    10   26   31  1  0 99  0  0
 0  0      0 236520  55412 671748    0    0     0     0   31   35  0  0 100  0  0

This shows the current values for various system statistics, including the number of processes waiting for run time (r), the number of processes in uninterruptible sleep (b), the amount of used and free memory, and the CPU utilization.

Created Time:2017-10-29 22:08:53  Author:lautturi