Proc file system is a virtual file system created at the time of system boot and dismissed after the system gets shut down. It is such a system that stores the information of the system such as processes. For the kernel, it acts as an information and control center. From the proc file system, various programs can get a handful of information used for various reasons.
From the /proc directory, the procinfo command can get useful information regarding the system. With that system information, the procinfo command provides the output in a better way for the user to read.
In this context, we shall look into the use of the procinfo command by installing it on Ubuntu 20.04 LTS server.
How to install Procinfo command ?
To install the procinfo command on Ubuntu 20.04 LTS server, we are going to run the below command:
$ sudo apt install procinfo -y
For more information, you can run the "man procinfo" command:
$ man procinfo
Examples of using procinfo command
You can run the procinfo command to see all the system status:
Below is the various items you would see in the output and their respective explanations:
- processor – Provides each processor with an identifying number. If you have one processor it will display a 0. If you have more than one processor it will display all processor information separately counting the processors using zero notation.
- cpu family – Authoritatively tells you the type of processor you have in the system. If your computer is an Intel-based system, simply place the number in front of “86” to determine the value. This is helpful to determine the type of architecture of an older system and is helpful in determining which compiled RPM package would best suit that system.
- model name – Gives you the common name of the processor, including the project name.
- cpu MHz – Shows the processor's precise speed, in megahertz, to the thousandth decimal point.
- cache size – Tells you the amount of level 2 memory cache available to the processor.
- flags – Defines a number of different processor attributes, such as the presence of a floating-point unit (FPU) and the ability to process MMX instructions.
To display the result between the information of the system per second, rather than the total value, we can run the command:
$ procinfo -d
To display the memory stats in a human readable form, you can run the following command:
$ procinfo -H
You can see all stats are on kiloByte(KiB), MegaByte(MiB) and GigaByte(GiB) which is more human-friendly and readable.
To display the result between the information of the system as total, rather than per second, we can run the command:
$ procinfo -D
By default, to show the output with the information such as memory stats, IRP and DMA information system, disk space, you can run the command:
$ procinfo -s
To display the updates of the stats continuously by pausing with n number of seconds by using the "-n" flag. Here we are using n = 3 for this session. You can run the command as follows and press "q" to break the session:
$ procinfo -n3 -H
To display the real free memory, you can run the command as follows with the "-r" flag:
$ procinfo -r
To display the version of the procinfo , you can run the following command:
$ procinfo -v
How to uninstall or remove procinfo software package from Ubuntu linux system ?
You can uninstall or removes an installed procinfo package itself from Ubuntu through the terminal:
$ sudo apt-get remove procinfo
You can also Uninstall procinfo including dependent package.
If you would like to remove procinfo and it's dependent packages which are no longer needed from Ubuntu:
$ sudo apt-get remove --auto-remove procinfo