Total cpu usage calculation by cdm probe in Solaris
search cancel

Total cpu usage calculation by cdm probe in Solaris

book

Article ID: 125561

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction



How is total cpu usage (QOS_CPU_USAGE) calulated by cdm probe in Solaris platform

Environment

UIM 8.51
cdm 6.30 
Solaris 10/11

Resolution

The CPU usage information is found by running the command "/usr/bin/mpstat" in a separate thread and parsing the data it provides. 

 "mpstat" utility is used only for cpu usage calculation.Not using "prstat" utility. 

"mpstat" utility output : 

CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys st idl 
55 11197 0 215 1574 0 2160 113 285 243 0 9663 22 13 0 66 
57 3335 0 136 1728 0 2259 122 244 166 0 6558 20 6 0 74 
58 3466 0 134 1455 0 1903 113 222 156 0 6062 20 6 0 75 
59 3834 0 136 1297 1 1691 104 209 150 0 5911 20 6 0 74 
60 4425 0 141 1728 4 2204 111 243 165 0 6701 22 7 0 72 
61 5560 0 156 1408 0 1854 108 231 179 0 6930 22 8 0 71 
62 7137 0 174 1431 2 1901 108 247 197 0 7737 23 9 0 68 
63 9088 0 191 1921 105 2422 124 311 219 0 9214 23 11 0 66 


Total CPU = 100; /* 100% *is* the maximum */ 

Total CPU Usage = 100 - Idle /* if idle is 66 then CPU Usage is 100 - 66 = 44 */ 

"mpstat" utility uses the interval from the probe and work out the average CPU usage over that time period. 

The mpstat command reports processor statistics in tabular form.
Each row of the table represents the activity of one processor.
The first table summarizes all activity since boot. Each subsequent table summarizes activity for the preceding interval. 
All values are rates listed as events per second. 
CPU usage information is collected for each of the CPUs, then the total is averaged for the Computer Device as a whole. 

Attachments

1558537054424example.txt get_app