For Raspberry Pi users, this command is helpful if someone wants to change the system configuration as it generates a report that can better balance the I/O load on the system’s file disk, volumes, and adapters.
This article will show you how to view the input and output statistics on Raspberry Pi using the iostat command.
Shows Raspberry Pi Device Input and Output Statistics Using iostat
By default, the iostat command isn’t installed on the Raspberry Pi system. The Raspberry Pi users can use the “iostat” command by installing the “sysstat” package on the system through the following command:
After the installation, the users can run the command “iostat” to get the I/O information on Raspberry Pi terminal.
The above command outputs the results related to the system’s logical and physical I/O devices.
The above command outputs can be summarized as follows:
%user: CPU utilization percentage at the user level.
%nice: CPU utilization percentage at the user level with a nice priority.
%system: CPU utilization percentage at the system (kernel) level.
%steal: CPU utilization percentage during the time spent in involuntary wait by the virtual CPU or CPUs while another virtual processor services the hypervisor.
%idle: CPU utilization percentage in the ideal mode.
The device/partition names are written in green color, while the other information includes transferring rate (tps), reading rate (number of blocks), and writing rate (number of blocks) followed by the total amount of blocks read and written after that.
If the users are only interested in getting the CPU information, they can apply the following command:
If the users want to get the device port information, they can use the following command:
To see the iostat information of only the main system storage, you can use the following command to get the result in kilobytes.
Similar information in megabytes can be drawn using the following command:
For further help, you can open the iostat manual using the following command:
Conclusion
iostat is a useful Linux command that displays the input and output statistics on the Raspberry Pi terminal. The above guidelines show how to use this command by installing the “sysstat” package on the Raspberry Pi system through the “apt” command. Afterward, different iostat commands are executed in the terminal to get the I/O statistics on the Raspberry Pi device.