iostat command is used to find CPU usage and other connected Input/Output devices.

  • iostat command is useful for evaluating the performance of I/O devices, and their efficiency.
  • It is also helpful for monitoring CPU Usage.

How to Install iostat command?

By default, iostat command is already installed in Linux/Unix. If it is not installed, you can install iostat command using the following command.

For fedora/ Red Hat/ CentOS

yum install sysstat

For Ubuntu / Debian / Linux Mint

sudo apt-get install sysstat

Syntax for iostat command

iostat [option] [device-name]

Uses of iostat command with example

CPU utilization report

iostat command without any argument display CPU utilization report.

 

iostat

iostat command in linux

Display report in Human readable format

iostat -h

iostat -h command in linux

iostat -x

iostat -x command in linux

iostat -xd

iostat -xd command in linux

iostat -N

iostat -N command in Linux

Display CPU usage only

By default iostat command displays reports of CPU and I/O device. But, you can restrict the iostat command to display CPU usage only. To display CPU usage only, use iostat -c command.

iostat -c

iostat -c command in linux

Display CPU usage only at a fixed time interval

You can also restrict iostat command to automatically display only CPU usage reports at a fixed time interval. To display CPU usage reports at a fixed time interval, follow the following syntax.

iostat -c INT

Here INT is a fixed time interval in seconds. Do not forget to change INT with your desired time interval. Here I am using 20 for INT. So, my final command will be iostat -c 20. This command will display the CPU usage report every 20 seconds interval.

iostat -c 20

iostat -c 20 command in linux

Display I/O device report in MegaBytes

iostat -m

iostat -m command in linux

Display I/O device report in KiloBytes

iostat -k

iostat -k command in linux

Display I/O device report in KiloBytes at fixed time interval

iostat -k 20

iostat -k 20 command in linux

Display the report of block devices

iostat -p

iostat -p command in linux

Display the report of block devices in MegaBytes

iostat -pdm

iostat -pdm command in linux

iostat -d

iostat -d command in linux

iostat -d sda7 sda6 2 3

iostat -d sda7 sda6 2 3 command in linux

iostat -j ID mmcbkl0 sda6 -x -m 3 2

iostat -j ID mmcbkl0 sda6 -x -m 3 2 command in linux

iostat -o JSON

iostat -o JSON Command in linux



Linux command with examples

A


adduser  |  addgroup  |  alias  |  anacron  |  apt  |  aptitude  |  arp  |  at atq  |  atrm  |  awk


B


basename banner | batch |  bc  |  bg  |  bzip


C


cat cal  |  cd  |  chgrp  |  chown  |  cksum  |  chmod  |  clear  |  cmp  |  comm  |  cp


D


date  |  dd  |  df  |  diff  |  dir  |  dmidecode  |  du


E


echo  |  eject  |  env  |  exit  |  expr


F


factor  |  find  |  free


G


grep  |  groups  |  gunzip  |  gzip


H


head  |  history  |  hostname  |  hostnamectl  |  htop  |  hwclock  |  hwinfo


I


id  |  ifconfig  |  ionice  |  iostat  |  ip  |  iptables  |  iw  |  iwlist


J


K


kill  |  kmod


L


last  |  less  |  ln  |  locate  |  login  |  lp  |  ls  |  lshw  |  lscpu  |  lsof  |  lsusb


M


man  |  mdsum  |  mkdir  |  more|  mv


N


nano  |  nc  |  neofetch  |  netcat  |  netstat  |  nice  |  nmap  |  nproc


O


openssl


P


passwd  |  pidof  |  ping  |  pr  |  ps  |  pwd  |  pstree


Q


R


rdiff-backup  |  reboot  |  rename  |  rm  |  rmdir


S


scp  |  shred  |  shutdown  |  sleep  |  sort  |  split  |  ssh  |  stat  |  su  |  sudo  |  sum


T


tac  |  tail  |  talk  |  tar  |  tee  |  time  |  tree  |  top  |  touch  |  tr


U


unalias  |  uname  |  uniq  |  unzip  |  uptime  |  users


V


vim  |  vi


W


w  |  wall  |  watch  |  wc  |  wget  |  whatis  |  whereis  |  which  |  who  |  whoami


X


xargs


Y


yes  |  youtube-dl


Z


zcmp  |  zdiff  |  zip  |  zz

Sharing is Caring
Scroll to Top