For Windows platforms, we are extracting the raw data from the Win32_Process class. The two required properties to compute the values of PercentCPU are UserModeTime and KernelModeTime. Both are 100 nanoseconds in units. This Windows Management Instrumentation (WMI) class operation is used for process related plugins such as the processes and top plugins. |
In each sampling, the Netprobe calculates the values 100 nanoseconds between samples using these two properties. i.e. (current sampling value) - (previous sampling value) where UserModeTime represents % User Time, while KernelModeTime represents % Privileged Time. To get PercentCPU or % Processor Time, the values of % User Time and % Privileged Time are added together for each process. Now, to compute the final percent_processor_time or PercentCPU of a specific process, the Netprobe gets the percentage of percent_processor_time (for a specific process) vs the TotalCpuTime (of all the processes). Where TotalCpuTime is the sum of all % User Time and % Privileged Time values of all of the processes in the probe's internal list. |
Comments
0 comments
Please sign in to leave a comment.