Site24x7 Kubernetes Monitor uses the kubelet API and kube-state-metrics API to collect the metrics related to memory and CPU utilization.
For memory utilization, the calculation works as follows:
Working set size (WSS) memory usage
--------------------------------------------- x 100 = Memory utilization (%)
Memory limit of pod
Example:
WSS memory usage = 150MiB
Memory limit set for that pod = 256MiB
Memory utilization by percentage = 150 / 256 x 100 = 58.5%
For CPU utilization, the calculation works as follows:
CPU usage
-------------------- x 100 = CPU utilization (%)
CPU limit of pod
Example:
CPU usage = 200 millicores
CPU limit of that pod = 400 millicores
CPU utilization in percentage = 200 / 400 x 100 = 50%