The /proc file system in Linux provides information about various aspects of the system such as system statistics, process information, and hardware configuration. To display system statistics gathered from /proc, you can use the ‘top’ or ‘free’ commands.
The ‘top’ command provides real-time information about system usage, including CPU utilization, memory usage, and process information. For example:
$ top
The ‘free’ command provides information about the amount of free and used memory in the system. For example:
$ free -m
This will display the memory information in MB. To display the information in KB, use:
$ free -k
You can also use the ‘cat’ command to display specific information from /proc. For example, to display the CPU information, use:
cat /proc/cpuinfo
To display information about the system memory, use:
cat /proc/meminfo
There are many other files in the /proc file system that provide information about various aspects of the system. To learn more about the /proc file system and the information it provides, refer to the man pages for proc(5).