Skip to main content

CPU Details are not showing in linux machine

Motadata pull CPU details with below commands.:

mpstat -P ALL

vmstat

vmstat | grep -v procs | grep -v r | awk {‘print $16""+" “+”"$17""+" “+”"$18’}

If your cpu widgets are empty. Please make sure mpstat/vmstat commands on targeted machine.

Below counters are being monitored with the help on mpstat command.

  1. (User CPU %)%usr: Show the percentage of CPU utilization that occurred while executing at the user level (application).
  2. (System CPU %)%sys: Show the percentage of CPU utilization that occurred while executing at the system level (kernel). Note that this does not include time spent servicing hardware and software interrupts.
  3. (I/O Wait %)%iowait: Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.
  4. (Idle CPU %)%idle: Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.
  5. (Intrupt CPU)intr/s: Show the total number of interrupts received per second by the CPU or CPUs.

Below counters are being monitored with the help on vmstat command.

  1. (Processor Queue Length) r : The number of processes waiting for run time.
  2. (Blocked Processes) b: The number of processes in uninterruptible sleep.
  3. (Intrupts/Sec)in: The number of interrupts per second, including the clock.
  4. (Context Switches/Sec)cs: The number of context switches per second.